Passing variables through snippets (help)
-
Hello! Can someone please help me on this?
I got very basic skills on PHP and i’m wanting to adapt to the new version of the plugin, which I think it’s great and much more dynamic.
So with the old version I used to had a single page using the plugin, displaying long codes through the [insert_php] tags. Now with this new version I wanted to break the code in two parts, pretty much like this:
CODE 1 = snippet that will run in everypage. it gets a few parameters, like the date
$todayD = date("d");it can always procces these parameters and generate new variables.
$example = $todayD * 3;CODE 2 = snippet that will run only via shortcodes. it will only show these results.
echo 'The number is ' . $example;My problem is that i can’t seem to pass these variables through the snippets. Is there any way to do this? Sorry if this question is too dumb.
Thanks in advance!
The topic ‘Passing variables through snippets (help)’ is closed to new replies.