- This topic has 7 replies, 4 voices, and was last updated 1 year, 1 month ago by
David.
-
AuthorPosts
-
November 23, 2019 at 9:57 am #1074038
eduard sans
Hi there, I am working on this blog where every post displays the date of the last update. Nevertheless, it doesn’t show these updated dates in Google search results. I’d like to know how to do it. Any ideas? Thanks in advance!
November 23, 2019 at 10:49 am #1074085Leo
StaffCustomer SupportHi there,
Try this:
https://docs.generatepress.com/article/generate_post_date_output/#only-show-updated-dateAdding PHP: https://docs.generatepress.com/article/adding-php/
Let me know if this helps 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/November 23, 2019 at 10:59 am #1074091eduard sans
Thanks! I added the code above. On the website everything seems fine but on Google results are still showing the old date. Do we have to wait for some time for it to work?
November 23, 2019 at 4:58 pm #1074277Leo
StaffCustomer SupportShould have to wait for their database to clear.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/December 10, 2019 at 7:37 am #1099959eduard sans
Hi there, it’s been 2 weeks and still not working. We tried to re-index them to see whether the database would refresh and nothing. Any other ideas?
December 10, 2019 at 5:34 pm #1100444Tom
Lead DeveloperLead DeveloperSince you’re using JSON LD in Yoast, it may be worth removing the schema added by the theme:
add_filter( 'generate_schema_type', '__return_false' );
Then, as long as your JSON LD has the date added, Google should pick it up and display it.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentDecember 16, 2019 at 3:25 am #1105603eduard sans
Hi Tom, sorry for the late reply but where should I add that line of code? in the functions.php file? or as a hook in elements?
¨Then, as long as your JSON LD has the date added, Google should pick it up and display it.”
What do you mean by that? How can I double-check that the JSON adds the date? Thanks again.
December 16, 2019 at 4:08 am #1105643David
StaffCustomer SupportHi there,
Yes, that code goes in your child theme functions.php.
Yoast automatically adds the JSON LD to the head of the page, checked your site and it contains the datePublished and dateModified meta.
Google makes the decision on what date to display, there is no clear answer on how that works – but some key factors from past SEO expert tests is:
1. The meta date you wish to be displayed is also visible to users – not sure if thats as relevant today.
2. It deems the content has been updated since the last crawl. Just updating the date is a bit of a hack that it seems to dislike.Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.