Archived topic
Show updated post date
7 replies · Started by Yvan on March 1, 2021
I've read several topics on this forum on this subject but I haven't found the right solution.
Hello,
I would like to display for modified articles, and only that, the date of modification preceded by a text (example "Updated on ").
This date must be visible in the SERP.
The CSS method displays the right result but is not taken by Google. A PHP code provided in a topic (and which seems to work according to the user feedback) displays only the date and it appears as a link.
Can you please help me?
Thank you
Hi Yvan,
With GPP 2.0's new feature Dynamic Data, you can achieve this easily with any style you want.
It's now in Alpha stage, open to public for testing, you could give it a try.
https://docs.generatepress.com/article/dynamic-data/
https://www.youtube.com/watch?v=-ZTQP_KA2xE&t=10s&ab_channel=GeneratePress
Let me know :)
Thanks Yin, but if i don't use generate block ?
I will however test on another site.
Is this the php snippet you tried?
https://docs.generatepress.com/article/generate_post_date_show_updated_only/
It shouldn't generate a link for date, could you try and confirm?
Thanks,
Yes I have seen this method. Do you know how to adapt this method by adding an "Unposted on" ?
Could give this CSS a try, adjust the padding:
.posted-on .updated-date:before {
content: "Unposted on";
padding: 8px;
}
Thanks Ying.
I try and see what it looks like in SERPs
You are welcome Yvan :)