- This topic has 7 replies, 3 voices, and was last updated 1 year, 6 months ago by Elvin.
December 7, 2020 at 4:27 am #1570209Bryan
I am using a Marketer theme but there is no option to show the updated date of the post instead of the published date on the posts and google search results.
I am a newbie so if you are referring me to certain changes in the theme files kindly guide me.December 7, 2020 at 4:37 am #1570221DavidStaffCustomer Support
it requires a little PHP Snippet to be added to your site.
This is the filter required for reference:
Options for adding PHP to your site is covered here in detail:
Quick snapshot of how to for that – there are two options:
Option 1. If you’re using a Child theme then copy the code provided ie:
add_filter( ‘generate_post_date_show_updated_only’, ‘__return_true’ );
And paste into your child themes functions.php file.
Option 2. If you’re not using a child theme then install the Code Snippets plugin:
Once enabled Dashboard > Snippets > New.
Paste the code in there and save it. Leave all other settings as default.December 7, 2020 at 8:35 am #1570568Bryan
OK, I get it. Very nice explanation.
And it’s working. I installed a plugin code snippets then add the provided code here.
Next help I want that it replaces the published date but I want the text to appear like ‘Last updated on’ so please help me with thatDecember 7, 2020 at 11:36 am #1570728DavidStaffCustomer SupportDecember 8, 2020 at 10:11 am #1571904Bryan
First of all, thank you so much, David.
Secondly, will it show in the Google search results?December 8, 2020 at 3:29 pm #1572146ElvinStaffCustomer Support
Secondly, will it show in the Google search results?
It will but not immediately. Google bots will have to recrawl your site with the updated settings first.
You can ask Google to recrawl your site if you’re worried that it might take too long.
A wise man once said:
"Have you cleared your cache?"December 9, 2020 at 2:55 am #1572552Bryan
Thank you so much. You guys are awesome.December 9, 2020 at 2:57 am #1572554ElvinStaffCustomer Support
Thank you so much. You guys are awesome.
No problem. Glad to be of any help. 🙂
A wise man once said:
"Have you cleared your cache?"
- You must be logged in to reply to this topic.