Archived topic
Show updated date in meta
3 replies · Started by Macca on January 30, 2022
I have recently updated all posts on my site. Rather than show the date they were published, I'd like to show the date they were updated.
I used a code for this which worked, but unfortunately Google has pulled through the original published dates to its search results (making the posts look old!)
Is there a code to use that makes the meta data also change, so Google is pulling through the date of the most recent update to the post?
Thanks!
Hi there,
The easiest and best method is to create a block element post meta template:
https://docs.generatepress.com/article/block-element-post-meta-template/
Then you can use the dynamic data option:
https://docs.generatepress.com/article/dynamic-data/#post-date
Let me know if this helps :)
Hi Leo,
Thank you for your help. Can I check a couple of things:
- If I do as you have suggested, would I need to go into every post and add this block in, or can you set it to appear across all blog posts?
- Will this update the post date that Google displays on search results, or just the date on the post itself once someone clicks through?
The key for me is that the Google search result is displaying the date of the most recent update so that the post looks current.
Many thanks
Hi there,
1. If you follow the instructions in the document then that will automatically display in every Post.
2. This will be up to Google. In theory and in most cases yes Google will use this date in the Search Results. What google does is first checks the meta data in the head of the post, and then compares those dates with the one displayed on the page. The ones that match are generally the one that its SERPs will display. But we can't say 100% for certain as Google does its own thing.