Posted By

ddabney on 03/12/11


Tagged

wordpress loop filter


Versions (?)

Filter Posts Using Query Posts


 / Published in: PHP
 

  1. query_posts('showposts=5&category_name=featured');
  2. if ( have_posts() ) : while ( have_posts() ) : the_post();
  3. <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
  4. <p><?php the_content(); ?></p>
  5. endwhile; else:
  6. endif;
  7. wp_reset_query();

Report this snippet  

You need to login to post a comment.