Posted By

ryarwood on 08/04/10


Tagged

wordpress loop query custom


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

osirisinternet
fillyouin
athanassiadis
booski


Simple Custom Query in Wordpress


 / Published in: PHP
 

  1. <?php $recent = new WP_Query("showposts=1"); while($recent->have_posts()) : $recent->the_post();?>
  2. <h3><a href="<?php the_permalink() ?>"><?php the_time('F jS, Y') ?><br />
  3. <span class="frontLeftTitle"><?php the_title(); ?></span></a></h3>
  4. <?php endwhile; ?>

Report this snippet  

You need to login to post a comment.