Archived topic
LAST UPDATE DATE ON POSTS AND GOOGLE RESULTS
25 replies · Started by Alan Gautham on November 16, 2018
Can you clear your caching plugin?
Sorry, that did not work either. Don't know what is the issue. It just doesn't show blog post date
Are you using this function now?: https://generatepress.com/forums/topic/last-update-date-on-posts-and-google-results/#post-808553
Sorry, I had turned it off in code snippet, when it did not work even after removing cache. Have re-activated it now.
One issue is that your .posted-on element is being hidden with this CSS: https://www.screencast.com/t/3uPJLa9u
The next issue if your dates aren't even printing in the source. What are your date settings set to in "Settings > General"?
Date format: 13th February 2019 in Settings General
Yes, but the css is as per your post https://docs.generatepress.com/article/show-the-updated-post-date/.
I even tried removing after removing the css but the post date is still not displayed.
The CSS I posted a screenshot of isn't the same CSS as in that post. Something is setting .posted-on to display: none !important.
Past that, we need to figure out why the core date functions in WP aren't working for you. Perhaps there's a conflicting plugin or function you're using?
Thank you very much. You were right, both the issues were due to a conflicting plug-in- WP-Old Post date remover, which i had on as Google was showing the earlier date in search results.
Just one last thing, it is not showing the content "Last updated" which i have added to the css as per your guide.
Also, is there a way of displaying the post date only for selected posts and having it off on others.
Try adding this CSS:
.entry-date:not(.published):before {
content: "Last updated: ";
}
You would have to use CSS on those specific pages to hide the date. My Simple CSS plugin adds a metabox to each page which you can add CSS to: https://wordpress.org/plugins/simple-css/
.posted-on {
display: none;
}
That worked just right! Tysm. I already have simple css installed. Will use it.
Awesome :) Glad I could help!