-
I have already pasted this code into the function.php file
Here is the codeadd_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
The ticket ‘Post updated date is not showing in SERP’ is closed to new replies.