Display Time?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #53586
    shkumbini
    Participant

    Hi there

    Is there any way to display time in recent posts tab.

    Thank You…

    #53601
    Xpark Media
    Keymaster

    @ shkumbini,

    Not using the options but you can change the markup by using a filter add_filter(‘pop_recent_title’, ‘function_to_change_title’);

    #53836
    shkumbini
    Participant

    Can you be more specific, please?

    Thanks…

    #53864
    Xpark Media
    Keymaster

    Add the following code to your themes functions.php file or if you know how to create a plugin add it to a plugin.

    Modify the html as needed.

    function pop_widget_add_time_to_post( $title, $post ){
    $time = date_i18n( get_option( 'date_format' ), strtotime( $post->post_date ) );
    return $title . '' ;
    }
    add_filter( 'pop_recent_title', 'pop_widget_add_time_to_post', 50, 2 );
    
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.