How to Show Last Updated Date in WordPress Blog? How do I see the last time a WordPress update was updated?
Search Engine Optimization (SEO) is a very big topic. There are lots of consideration you have to keep in mind in order to have correct SEO implementation for your blog. Google shows post publish date in search result page.
Here are few Crunchify’s featured examples:
Sometimes you may have to modify blog post if you find some code bug or typo. In such a case it’s advisable to update date appropriately.
Let’s say you have published post on March 2nd, 2022
and for some reason you update post on March 13th, 2022 then post should tell March 13th, 2022
.
Making your content appear fresh to Google.
Adding Last Updated Timestamp On Your Blog Posts
Let’s get started:
Look at below changes:
Change Published On to Last updated on
I’m using Genesis Framework, and it’s very easy to update this with simple hooks. Just put below code to your child themes functions.php file and you should be all good.
function crunchify_get_updated_date_for_post() { $date = '<i>' . get_the_modified_date() . '</i>'; return $date; } add_shortcode( 'crunchify_modified_date', 'crunchify_get_updated_date_for_post' ); add_filter( 'genesis_post_info', 'crunchify_add_updated_date_info' ); function crunchify_add_updated_date_info($post_info) { $post_info = 'Last Updated on [crunchify_modified_date] by [post_author_posts_link] [post_comments] [post_edit]'; return $post_info; }
If you are not using Genesis Framework and want to achieve the same then follow below steps:
Step-1
Open below files:
- index.php
- page.php
- single.php
Step-2
Look for an entry for post meta in above files i.e. Posted on
or Updated on
and update this accordingly.
<?php if (get_the_modified_time() != get_the_time()) : ?> <p>Posted: <?php the_time('F jS, Y'); ?> at <?php the_time('g:i a'); ?>, Last Updated on: <?php the_modified_time('F jS, Y'); ?> at <?php the_modified_time('g:i a'); ?></p> <?php else: ?> <p>Posted: <?php the_time('F jS, Y'); ?> at <?php the_time('g:i a'); ?></p> <?php endif; ?>
What is your plan?
Are you planning leave Default WordPress Date
or planning to update your blog which shows Last Updated on: Date
?
I would highly recommend changing it to Last Post Update date.