Posted By

justinseiter on 04/26/09


Tagged

php wordpress sidebar


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

keith
fabi


Show Post Date on Recent Posts in WordPress Sidebar


 / Published in: PHP
 

URL: http://wordpress.org/support/topic/244522

  1. <?php
  2. $args=array(
  3. 'showposts'=>3,
  4. 'caller_get_posts'=>1
  5. );
  6. $my_query = new WP_Query($args);
  7. if( $my_query->have_posts() ) {
  8. while ($my_query->have_posts()) : $my_query->the_post(); ?>
  9. <p><small><?php the_time('m.d.y') ?></small> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></p>
  10. <?php
  11. endwhile;
  12. }
  13. ?>

Report this snippet  

You need to login to post a comment.