How to set a global variable
-
Hi, I need your help.
I’m a beginner with WP and I’d like to know how to set a global variable and filter the query result of my site.Example:
In my movie site I have a navigation menu with 3 categories:
– Horror
– Triller
– ComedyIn the sidebar I want to put another menu (maybe check boxes) with the years of the movie
– 2011
– 2012
– 2013Now, when I choose the year, for example 2012, I want to set a global variable so the result of the query of my main menu items will change.
In this case if i click “triller” I will see only the triller movie of the 2012. Then if I change the section clicking “comedy” the result of the query will shows comedy movie of the 2012…so until I will change or reset the year.Can you help me?
(sorry for my english)
The topic ‘How to set a global variable’ is closed to new replies.