forcing value of conditional tags doesn’t work in 2.6.2
-
I have been using the method of manually setting the value of conditional tags like is_home after calling query_posts() in the sidebar, like this:
query_posts('some_custom_query'); $wp_query->is_home = true; $wp_query->is_category = false; $wp_query->is_archive = false;
this doesn’t seem to work in 2.6.2 anymore. is_category doesn’t change its value. just to be sure:
echo(is_category()); $wp_query->is_category = false; echo(is_category());
does output both times “1”, when it should output “0” the second time.
is this a bug? is there any workaround?
- The topic ‘forcing value of conditional tags doesn’t work in 2.6.2’ is closed to new replies.