Support » Plugins » [Plugin: Advanced Most Recent Posts] Display post's date

  • Hello,

    I use the Advanced Most Recent Posts plugin and I was wondering if I could display each post’s date (and preferably time as well).

    Based on this discussion I tried
    $excerpt = ': ' . $excerpt . ' ' . get_the_date();
    on line 198 of the .php file.

    Unfortunately, it didn’t display the publication date of each post but instead, it keeps repeating one particular date (which happens to be the date I created the WP blog).

    Any ideas about how I could get the post’s date / time displayed in my list?

    Thank you in advance

Viewing 3 replies - 1 through 3 (of 3 total)
  • I’m also looking for this…

    If anyone could help out that’d be great.

    Kailey (trepmal)


    Volunteer Mod & Reviewer

    Yup, you can try something like this, just edit it as needed:

    $time = date('m/d/y',strtotime($post->post_date));
    $excerpt = ' (' . $time . '): ' . $excerpt;

    If you want to do it without using a plugin but within a template for example you can do it this way:

    in the template file:

     $postslist = get_posts('numberposts=3&order=DESC&orderby=date');
     foreach ($postslist as $post) :
     <div class="entry">
     <h3><?php the_title(); ?></h3>
     <?php the_excerpt(); ?>
     <?php endforeach; ?>

    Just change the number of posts of 3 to how ever you want.

    and in the functions file to reduce the excerpt length limit from the default of 55

    add_filter('excerpt_length', 'my_excerpt_length');
    function my_excerpt_length($length) {
    return 20; }

    just change the number 20 to what you want, I used 20.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Advanced Most Recent Posts] Display post's date’ is closed to new replies.