Support Forum
Ok, now we are getting into the interesting stuff.... 🙂
I have several php variables that are available on my page.php... but if I try to use them in spTopicView.php, they are not there. I don't think they are being passed to the forum template pages.
So, for example, I can:
echo $sample1;
echo $sample2;
on my wordpress page.php and get those results.
If I put the same code into spTopicView, the variables aren't there.
Any thoughts on the best way to pass the variables to the forum template pages?
Thanks,
Chris
***
News For Shoppers is seeking consumer reporters,
consumer advocates, and entertainment writers:
visit: NewsForShoppers.com/write/
what do you mean by available? keep in mind that php is a programming language so variables have scope... and are only available within the scope of their definition (ie within routine)...
perhaps you could try, before using the variable defining it as global... so something like:
global $sample1, $sample2;
and then in the sp template where you want to ask, do the same... then you should be able to reference...
of course, global variables are a bit hackish, but tend to work...
Visit Cruise Talk Central and Mr Papa's World
You nailed it, global, I should have thought of that. I was making it more complicated than it needed to be 🙂
Thank you!
***
News For Shoppers is seeking consumer reporters,
consumer advocates, and entertainment writers:
visit: NewsForShoppers.com/write/
1 Guest(s)