[Resolved] SERP Custom Post Date

Home Forums Support [Resolved] SERP Custom Post Date

Home Forums Support SERP Custom Post Date

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2287103
    Sam

    Hello,
    I want to optimize the GP post date for SERP.
    I want to show the post date when the post is still new (e.g., I haven’t edited it or updated it yet).
    But when it is updated, I want to show the latest update date. Not only to the users but to search engines as well.
    Is this possible?

    #2287217
    David
    Staff
    Customer Support

    Hi there,

    by default GP will output both the Published and Updated date, one of which is hidden using CSS.

    Alternatively add the PHP Snippet provided here to your site:

    https://docs.generatepress.com/article/generate_post_date_show_updated_only/

    It will display only a single date ie. for new posts it will show the published and for updated posts it will show just the updated date

    #2292725
    Sam

    Hello David, sorry about the late reply.

    I’m using a custom Content-Template for my posts.
    The only date in my CT is the updated date.

    So by using said CT does GP output the publishing date anyway?
    I’m trying to hide the publishing date from search engines.

    #2292766
    David
    Staff
    Customer Support

    If you’re using a Content Template that has replaced the default themes meta then GP is only going to output the Updated date.

    But…. SEO or JSON-LD Schema plugins may add both dates in the <head> of the web page.
    If you want to share a link to a post on the site i can take a look for that.

    #2292967
    Sam

    Good to hear!

    Nothing on the web yet; I’m still building the site locally, but thank you, David.

    I also appreciate the tip about the plugins. I’ll check the view-source mode and see if anything besides GP is outputting the date in the <head> tag.

    #2292974
    David
    Staff
    Customer Support

    You’re welcome

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.