the answer for all question about Oxygen Builder plugin and WordPress

I like to use the variable values fetched in the code blocks in the entire templ

I like to use the variable values fetched in the code blocks in the entire template.

For some reason if I echo the variable in another code block of some other section of the template. Its not giving me results.

Any leads?



Source

1 Comment
  1. Matt Hias says

    Each Code Block is evaluated in its own (kinda) “sandbox”.
    In an eval() scope, to be exact.
    If you want to access variables between Code Blocks you would have to work with $GLOBALS

    https://www.php.net/manual/en/reserved.variables.globals

    You didn’t mention if you’re talking about PHP or JS. I’m assuming PHP here.
    For JS you can store variables in window, like window.MY_GLOBAL_VALUE.

Leave A Reply

Your email address will not be published.

Oxyrealm Docs