bikerjeg
Member
Posted 2 months ago #
I am modifying a plugin to only work on certain pages. I thought I could use conditional tags from within the plugin but it seems that the plugin runs before the $wp_query is initialized with values so the "is_" conditional functions don't actually return true or false but calling function_exists for is_single() and so on return true.
How can I determine conditional tags on my own or another way within a plugin?
bikerjeg
Member
Posted 2 months ago #
the plugin is the WP External Links Bar
grizzdesign
Member
Posted 1 month ago #
*bump*
Can we, and if so, how can we use conditional tags inside plugins ?
Or... how can we make a plugin only load on a certain page (to save load with both parties).
Like only load plugin X on homepage, only load plugin X if is_admin, only load plugin X if is_single, all kinds of stuff.
PS: I think is_admin() does work though.