• On the list of my pages and posts, the right hand column is labelled ‘Date’ and shows, for each page and post, a date (the published date) and underneath that either the words ‘Published’ or ‘Last Modified’ (not really sure what the difference is as all pages/posts have been modified at some time).

    Frankly, I don’t find the published date terribly helpful whereas the last modified/updated date would be much more useful. So I would like to either modify the column or add another one with the appropriate date. I have found a couple of other forum queries along similar lines but the replies have not resolved the issue.

    First, can I please ask if anyone knows of a plugin that would help. If not, can anyone please tell me how one suggests improvements to be considered for future updates (and whether there is any realistic chance of such a suggestion being incorporated?)

    Many thanks,

    V

Viewing 5 replies - 1 through 5 (of 5 total)
  • somewhere in your templates, there is the code the_time() or the_date() (probably with some stuff in the brackets);
    replace it with the_modified_time()

    https://codex.www.ads-software.com/Function_Reference/the_modified_time

    Thread Starter Victor_Delta

    (@victor_delta)

    Many thanks. I can find the templates that govern the ‘public’ appearance of my blog but where do I find the ones that affect the ‘behind the scenes’ pages such as the page and post lists?

    If I do the mod you suggest, presumably I will need to repeat it after WP is updated each time?

    look for the functions.php file in your theme folder, you need to make the change in function twentyten_posted_on() as alchymyth said, there should be get_the_date() you can change to get_the_modified_date()

    Thread Starter Victor_Delta

    (@victor_delta)

    Thanks. My theme is Dodo and the functions.php file looks like the following. No sign of get_the_date()… where next?

    <?php
    
    if ( function_exists('register_sidebar') )
        register_sidebar(array(
            'name' => 'Sidebar 1',
            'before_widget' => '<div id="%1$s" class="widget %2$s">',
            'after_widget' => '</div>',
            'before_title' => '<h2>',
            'after_title' => '</h2>',
        ));
    
    if ( function_exists('register_sidebar') )
        register_sidebar(array(
            'name' => 'Sidebar 2',
            'before_widget' => '<div id="%1$s" class="widget %2$s">',
            'after_widget' => '</div>',
            'before_title' => '<h2>',
            'after_title' => '</h2>',
        ));
    
    ?>

    You need to look for the <div class="postmetadata"> in index.php, archive.php, search.php and single.php. Where you see <?php the_date(); ?>; write <?php the_modified_date(); ?>; instead. Let me know if it works! Check all the kinds of pages and archives where you would normally see the published date.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Display modified date instead of published date’ is closed to new replies.