Support » Themes and Templates » getting info about WHERE I am inside the header

  • Resolved



    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.


Viewing 2 replies - 1 through 2 (of 2 total)
  • There is no solution?

    Maybe I have to do the header inside the loop even if It have no logical sense?

    I resolved with this topic for get the top-parent page.

    For the variables, I used $_SESSION

    I will think about a better way in the future.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘getting info about WHERE I am inside the header’ is closed to new replies.