In my wordpress theme I need to hide all posts from a category, Si I am using this code
<?php query_posts('cat=-307'); ?>
<?php while ( have_posts() ) : the_post(); ?>
...
It works great, but then when I try to view all posts that a specific category, e.g. category/jquery I dont get only the jquery posts, but I get all the posts again.
If I remove the fist line of the code above, then it works as expected.
I have used the boilerplate theme, so the rest of the code is not the problem.
How can I fix this by keeping the query_posts() filter but also get only specific categories when needed
Thanks
I found the problem. I just beed the query_posts() to take effect on the homepage of the blog. So all I did was, removed
from the
loop.phpand added it toindex.php