WordPress.org

Ready to get started?Download WordPress

Forums

Top 10 - Popular posts plugin for WordPress
[resolved] Post date? (4 posts)

  1. natebarquin
    Member
    Posted 1 year ago #

    Hi All,

    I was wondering if you guys had any clue on how to add a the_date(); to the plugin? if not, do you have any idea on how i can tackle this?

    Thanks in advance

    http://wordpress.org/extend/plugins/top-10/

  2. Ajay
    Member
    Plugin Author

    Posted 1 year ago #

    To do this, you'll need to modify the top-10.php file.

    http://plugins.trac.wordpress.org/browser/top-10/trunk/top-10.php

    Before Line 281, add:

    $result = get_post($result->postnumber);

    Then before line 294, add:

    $output .= '<span class="tptn_date"> '.mysql2date("d/m/y", $result->post_date).'</span>';

    Please backup before you make any edits to the files

  3. natebarquin
    Member
    Posted 1 year ago #

    Hi Ajay,

    Thanks a bunch, worked perfectly.

    NB

  4. Ajay
    Member
    Plugin Author

    Posted 1 year ago #

    Sounds great. I'll add this as an option in the next version.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags