• Resolved percepts

    (@percepts)


    I just set up a site for a client and mnaually inserted a load of projects in what I thought was chronogical order with the oldest inserted first. The intention being that the most recent would appear as the most recent. Turns out they are not in the correct order.

    So is there any way to manually edit the post date short of editing the database tables directly, which I could do, but am not sure if that will have an undesirable impact?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Edit the publication date in the post editor. You don’t have to go into the database.

    Thread Starter percepts

    (@percepts)

    Thanks,

    I just spotted that and have been playing…

    Hi,

    you can display updated date of your post meta data rather than showing just the original published posting date. For that you need to edit the single.php file of your theme. Before edit the single.php take a backup of this file.

    Now, find the Code:

    Posted on: <?php the_time(’l, F jS, Y’) ?>

    Replace with:

    Posted on <?php the_time(’F jS, Y’) ?>
    <?php $u_time = get_the_time(’U');
    $u_modified_time = get_the_modified_time(’U');
    if ($u_modified_time != $u_time) {
    echo “and last modified on “;
    the_modified_time(’F jS, Y’);
    echo “. “; } ?>

    Now your posts will shows the last modified date immediately after the original published date rather than just showing the original post date. Now you can sort the posting by modified date of your post.

    For that refer this plugin:

    http://wordpress.org/extend/plugins/wp-post-sorting/

    Thanks,

    Shane G.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘how to alter post date’ is closed to new replies.