Show Post Date on Recent Posts in WordPress Sidebar


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  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. ?>

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.