Display "Last Updated/Modified Date" on WordPress Blog Articles

without-plugin

#1

By default, in your WordPress blog posts, you’ll find the ‘Published’ date, like if you published a post two years back on April 3rd, then the date will be like 03.04.2015. Even search engines take this date and display it in the search results. But it’s kinda annoying right, like, you published this post two years back, but you keep on updating it till now, still search engines and readers think it’s outdated and two years old.

So the easy solution for this is to display the ‘Last Updated/Modified Date’ on your WordPress blog post articles, so that search engines will also consider that you have updated the post with new information and they’ll display the ‘updated’ date on search results.

Go to your theme editor, find single.php file, and there, search for your default normal PHP tag which shows the date, and replace that with this ‘modified’ code tag below:

<?php the_modified_date(); ?>

So replace the code with this, and save the file.

And this is how it appears, I edited this post today and added new information, so the ‘date’ gets updated as well.

This is something all the blogs should have, we have been blogging for years, and we keep on updating them. So this small tweak will help search engines to understand that we have freshly updated the content. :smiley:

This is the permalink: https://hellboundbloggers.com/articles/sites-that-pay-to-write-reviews/4396/

We made sure that there is no ‘year’ or ‘month’ in the permalink URL. Because we realized we update the articles often, and it feels awkward to have the published year in the URL. I felt like this.

It might take some time for the search engines to understand that the author has updated the article, so after some time, your blog post will appear like this in search engine results, like this one from Google:


Removing Date from SERP?
Should I delete those old posts
Meta Descriptions using SEO by Yoast not appearing Google Search. Can someone please help
#2

Do you need to have that Updated On attribute for the article? I always thought that search engines such as Google would interpret that the post has been updated automatically. I may be wrong though.


#3

Hello, How can I hide date from Google SERP.


#4

True bro, but I don’t think Google will accept that ‘specific time’ and display it on search results. Experienced this a lot, but when the ‘updated date’ (which is present in the article) changes, I can see the impact within a few days. :slight_smile:


#5

You can just remove the dates everywhere bro, I’m sure Google will not find out, maybe they will know the indexed date, but after some time they will not show them in the search results.


#6

Bro, How do I do it in Genesis theme? :frowning:


#7

Hi bro, I think Genesis uses shortcodes for this. Can you go to your functions.php file and let me know if you see any tags related to date there? :slight_smile:


#8

No bro. Nothing in single.php or functions.php :frowning:


#9

Oops. :frowning: Then I would suggest you to install Genesis’s official Simple Edits WordPress plugin bro.

After installing, kindly go to Genesis (settings) > Simple Edits and here you’ll find a section like “Entry Meta”, paste this there:

Last updated: By [post_author_posts_link] | On [post_modified_date] | [post_comments] [post_edit]

Let me know if this works bro. :slight_smile:


#10

Got it bro. Searched the net. And got it. Adding this to functions.php of child theme did the trick :smiley:

add_filter( ‘genesis_post_info’, ‘sp_post_info_filter’ );
function sp_post_info_filter($post_info) {
if ( !is_page() ) {
$post_info = ‘[post_modified_date] by [post_author_posts_link] [post_comments] [post_edit]’;
return $post_info;
}}

You can add it to the post bro :slight_smile:


#11

Glad it worked bro. Thanks for sharing the code. :slight_smile:


#12

also not available in meks Grid Love theme, please help.


#13

I haven’t used Grid Love theme @utsavchopra, but I can try my best to help you out. Do you have single.php theme file? Can you find any PHP tag related to ‘date’ there? :slight_smile:


#14

no bro nothing related to date in single.php and in functions.php


#15

Oops, kindly go to the theme folder via FTP / File Manager and search for this ‘date’ function bro… some themes will have such files hidden in folders, they code like that.


#16

Not able to find, any other method bro?


#17

Oops, I would suggest you contact the official theme support bro, their coding might be different…


#18

Hi @pradeepkumar I am using Beginner theme on my blog,

followed your instruction, but Didn’t find this Code “<?php the_modified_date(); ?>” in Single.php file