I have to create a customized sidebar, not only in the common sidebar (after the loop) but also in the header of my wordpress page.
So I need two things:
1) a way to know WHERE I am... functions like in_category and in_page force me to consider infinite cases...
I just need to know:
- the category where I am
- the mother page where I am
2) Also, I need a way to use variables inside all my wordpress blog.
I want to define a $where_i_am variable to change dynamically my header menu behaviour, so, How do I do that?
Using a variable in the theme index is useless cause in the header, sidebar, and so on... the variable is always null.
I have register_globals = off but I also use to force a "global $where_i_am" without success.
I also tryed to register the variable inside something like $_GLOBALS['where_i_am']... without success.