Post updated date is not showing in SERP

#595937
  • Resolved Anonymous
    Rank Math free

    I have already pasted this code into the function.php file
    Here is the code

    add_filter( ‘generate_post_date_output’, function( $output, $time_string ) {
    $time_string = ‘<time class=”entry-date published” datetime=”%1$s” itemprop=”datePublished”>Published on: %2$s</time>’;

    if ( get_the_date() !== get_the_modified_date() ) {
    $time_string = ‘<time class=”entry-date updated-date” datetime=”%3$s” itemprop=”dateModified”>Last Updated on: %4$s</time>’;
    }

    $time_string = sprintf( $time_string,
    esc_attr( get_the_date( ‘c’ ) ),
    esc_html( get_the_date() ),
    esc_attr( get_the_modified_date( ‘c’ ) ),
    esc_html( get_the_modified_date() )
    );

    return sprintf( ‘<span class=”posted-on”>%s</span> ‘,
    $time_string
    );
    }, 10, 2 );

    But the published date is showing in SERP.
    Here is the list of some post
    https://www.gyanitechraviji.com/youtube-video-par-view-kaise-badhaye/
    https://www.gyanitechraviji.com/ms-access-kya-hai-in-hindi/
    https://www.gyanitechraviji.com/t-series-ka-malik-kaun-hai/

    Please check this above post.
    This code is already attached to the site from the last year. So why this problem creates? Because these posts are crawled by Google one day ago.

    Actually, there are multiple numbers of posts that faced this issue on site.
    Please guide me about this to fix this problem.
    gyanitechraviji.com

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello,

    Thanks for contacting us and sorry for the inconvenience caused.

    The last updated date is taken from your content. Since you have already added it to the front end and it is also added to the Schema by our plugin, all you can do is wait for Google to decide to show it in the SERPs.

    Don’t hesitate to get in touch in case you need our assistance with anything else.

    Anonymous
    Rank Math free

    How to replace with front end.

    Anonymous
    Rank Math free

    Actually, I want to show the updated dates only on Google, So how to do it?

    Hello,

    Unfortunately, this is something an SEO plugin cannot control. One of the most prominent ways (in our experience), is the date shown by the theme on the page.

    Google usually picks and shows the date they see in the content itself and show it in the SERPs. Meaning, that if you have a visible date on your content, that will be picked up by Google and displayed beside the snippets.

    For more details, please refer to this article:
    https://rankmath.com/kb/remove-dates-from-search/#how-google-find-date

    Hope that helps.

    Thank you.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)

The ticket ‘Post updated date is not showing in SERP’ is closed to new replies.