WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a problem with is_home(). It is placed in my footer.php and it returns true when it shouldn't. I have a page template on which I perform a query with query_posts().

When I pass the following as the argument,

array( 'cat' => $lekarz_page_cat_id, 'paged' => get_query_var('paged') )

it returns false which is ok, but when the argument is

array('post__in' => $pz_posts, 'paged' => get_query_var('paged'))

it returns true when it shouldn't. Can someone tell me why this is so?

share|improve this question
if you are using query_posts() in a template (not recommended, rather use get_posts() or WP_Query() ), you might need to end this with wp_reset_query(); to reset the querystring to the original. – Michael Dec 5 '11 at 12:58

If you are using a static page for your homepage. Then you should be using is_front_page();. Check this link -> http://codex.wordpress.org/Conditional_Tags

share|improve this answer
No I wasn't use static page as my homepage but now i'am and it works fine with is_front_page();. big THX – partyzant Dec 5 '11 at 11:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.