WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] using conditional tags before "wp" hook (4 posts)

  1. shazdeh
    Member
    Posted 1 year ago #

    As the codex page explains, "wp" is the earliest hook that conditional tags can work. I'm in a situation where i need to run these on 'plugins_loaded' hook and so these functions don't work anymore. Is there any way to force WP to build the query on that hook?

  2. ak75963
    Member
    Posted 1 year ago #

    can u explain further the condition you are in?

  3. esmi
    Forum Moderator
    Posted 1 year ago #

    Is there any way to force WP to build the query on that hook?

    Not that I'm aware of. What is it that you are trying to do?

  4. shazdeh
    Member
    Posted 1 year ago #

    I was trying to change the theme based on the page the user is visiting. The "wp" hooks happens after theme setup so that was not possible. I actually implemented it by matching URLs instead of using conditional tags: http://wordpress.org/plugins/theme-logic/. :)

Topic Closed

This topic has been closed to new replies.

About this Topic