Posted By

sawyer on 07/06/10


Tagged

wordpress


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

manavecplan
booski


Query posts by category


 / Published in: PHP
 

  1. <?php query_posts('cat=4');
  2. if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
  3.  
  4. //post output goes here... index.php typically provides a good template
  5.  
  6. <?php endwhile; endif; ?>
  7. <?php wp_reset_query(); ?>

Report this snippet  

You need to login to post a comment.