Stay on Track with WordPress: Excluding Categories for Your Blog

Stay on Track with WordPress: Excluding Categories for Your Blog

Sometimes the themes we install don’t give up the ability to fine tune our blogs to only delivery specific category content to our viewers. So here is a quick and easy way to resolve this:

In your themes blog template, find this line of code:

if (have_posts()) : while (have_posts()) : the_post();

and place this “query_post” line of code before it:

query_posts($query_string . '&cat=-13,-9');

Your code should now look like this:

query_posts($query_string . '&cat=-13,-9');
if (have_posts()) : while (have_posts()) : the_post();

That’s all! Enjoy

Submit a Comment

five × 4 =