Posted By

pruntrut on 07/05/12


Tagged


Versions (?)

Custom Query


 / Published in: Other
 

  1. <?php $query = new WP_Query(''); ?>
  2. <?php if($query->have_posts()) : ?><?php while($query->have_posts()) : $query->the_post(); ?>
  3. <?php the_content(); ?>
  4. <?php endwhile; endif; ?>
  5.  
  6.  
  7.  
  8. <?php $featured = new WP_Query('showposts=3&tag=featured'); ?>
  9. <?php if($featured->have_posts()) : ?>
  10. <ul id="featured">
  11. <?php while($featured->have_posts()) : $featured->the_post(); ?>
  12. <li><a href="<!--?php the_permalink(); ?-->" title="<?php the_title(); ?>"><?php the_post_thumbnail(‘full’); ?></a></li>
  13. <?php endwhile; ?>
  14. </ul>
  15. <?php endif; ?>

Report this snippet  

You need to login to post a comment.