Posted By

rocktronica on 06/05/09


Tagged

page wordpress index category remove categories Front exclude


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

mrbassman12
rocktronica
maxvee8
adambundy


Exclude WordPress Categories on Secondary Front Pages


 / Published in: PHP
 

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

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.

  1. <?php if ( is_home() ) {
  2. query_posts("paged=$paged&cat=-3");
  3. }
  4. while (have_posts()) : the_post(); ?>

Report this snippet  

You need to login to post a comment.