Posted By

adambundy on 09/15/10


Tagged

wordpress


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

adambundy
mikoli


Wordpress Custom Query


 / Published in: PHP
 

  1. <?php $mycustom_query = new WP_Query('cat=106&showposts=10'); ?>
  2.  
  3. <?php while ($mycustom_query->have_posts()) : $mycustom_query->the_post(); ?>
  4.  
  5. <div class="post" id="post-<?php the_ID(); ?>">
  6. // stuff
  7. </div>
  8. <!-- .post -->
  9.  
  10. <?php endwhile; ?>

Report this snippet  

You need to login to post a comment.