Exclude WordPress Categories on Secondary Front Pages


/ Published in: PHP
Save to your folder(s)

If you leave out the "paged" parameter, the same results are queried and shown on each pagination. Of course, you'll want to change the "3" to whichever category you'll want to exclude.


Copy this code and paste it in your HTML
  1. <?php if ( is_home() ) {
  2. query_posts("paged=$paged&cat=-3");
  3. }
  4. while (have_posts()) : the_post(); ?>

URL: http://iamnotagoodartist.com/2009/04/wordpress-excluding-categories-on-secondary-front-pages/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.