• Resolved jackgmarch

    (@jackgmarch)


    Hi,

    On my site jackgmarch.com it shows the date the post was updated instead of the date it was published at the top of the article on the homepage as well as on the actual posts.

    This is very misleading as it doesn’t show the original date published alongside, I could’ve written something in 2011 and if it was updated in 2015 nobody would know when it was originally written.

    How do I change this on this theme? It wasn’t here till I updated it a few days ago.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Yes jackgmarch,
    The theme seems to have been updated.Please go through the following steps and it should be fine:
    1. Create a Child theme, so that in future even if the theme gets updated the changes will always remain in your theme.
    To create child theme you can use plugin: https://www.ads-software.com/plugins/one-click-child-theme/. Your child theme name should be different than your parent theme.

    2.Next Replace with following codes from loop-archive.php, loop-blog.php and loop-post.php inside child theme

    <?php if ( get_the_modified_time() != get_the_time() ) { ?>
    						<?php esc_html_e("Posted on", 'swell-lite'); ?> <?php the_time( esc_html__("F j, Y", 'swell-lite') ); ?>
    					<?php } else { ?>
    						<?php esc_html_e("Posted on", 'swell-lite'); ?> <?php the_time( esc_html__("F j, Y", 'swell-lite') ); ?>
    					<?php } ?>

    3. Use Filezilla to upload the code. To make change/update use filezilla.
    Watch https://www.youtube.com/watch?v=xzxGVaoG2CY

    4.Place the 3 files I mention above inside same directory as in original theme, else it won’t work.

    If all is Ok, the updated time should now be changed to posted time.

    Thank you!!

    Thread Starter jackgmarch

    (@jackgmarch)

    Thank you very much Madhusudan! I’m very glad it was this simple! I am so so grateful!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Show post published date, not update date’ is closed to new replies.