Hi there ,
Having an issue with query_posts stopping an is_home statement working.
On my homepage I have a query_posts statement before the loop that displays only posts from a certain category ….
<?php query_posts( 'cat=10' ); ?>
Further down my index.php file I have a simple ‘is_home’ if statement that outputs some code if it is the homepage. However , this stops dead in its tracks when I use ‘query posts’ above . If I remove the query posts’ it works fine , but then I have every single post from every category outputted on my front page , when all I want are posts from a certain category. Any idea why this might be ?? Really tearing my hair out with this one!
- The topic ‘Problem with query_posts and is_home if statement.’ is closed to new replies.