Hopefully a simple question today. I have a theme that I want to set a few global variables in. Specifically, I want to generate a random number between x and y.
I added the following to functions.php, but it seems not to have worked:
global $QUOTE_MIN; global $QUOTE_MAX; $QUOTE_MIN=1; $QUOTE_MAX=9;
Is there some other way to achieve this?
- The topic ‘How can I add a global variable accessible by my theme?’ is closed to new replies.