php - Wordpress exclude category from blog in twenty twelve template -
I googling around without having to use a plugin, how to exclude a category from my blog I
I came up with this:
& lt ;? Php query_posts ('cat = -2'); ? & Gt; & Lt ;? Php while (is_pause ()): the_post (); ? & Gt; & Lt ;? php get_template_part ('content', 'page'); ? & Gt; & Lt ;? Php // comments_template ('', is true); ? & Gt; & Lt ;? php timeline; // the end of the loop? & Gt; But this does not remove blog posting with the category id of 2. Why can this be clarified?
Try this:
query_posts ($ query_string. '& Amp; ; Cat = -2 ');
Comments
Post a Comment