Site logo

Archived topic

LAST UPDATE DATE ON POSTS AND GOOGLE RESULTS

25 replies · Started by Alan Gautham on November 16, 2018

Viewing posts 16–26 of 26

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

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"?

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!

This archived topic is closed to new replies.