Structured Data Errors: Published vs Updated Dates
-
I am using the Twenty Ten theme and have missing data errors in Google Webmaster Tools. I got the fix below in the functions.php file:
function twentyten_posted_on() { printf( __( '<span class="%1$s">Posted on</span> %2$s <span class="meta-sep">by</span> %3$s', 'twentyten' ), 'meta-prep meta-prep-author', sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><span class="entry-date updated">%3$s</span></a>', get_permalink(), esc_attr( get_the_time() ), get_the_date() ), sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>, date modified: %4$s', get_author_posts_url( get_the_author_meta( 'ID' ) ), sprintf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ), get_the_author(), esc_attr( get_the_modified_date() )
It entails adding “updated” to class=”entry-date”. However, though this eliminates the “missing” errors in Google, Google actually displays the original published date, not the date I updated the article. Although I did get both the published and updated date to display properly on my blog by adding “date modified: %4$s'” and “esc_attr( get_the_modified_date() )” as shown above, Google still displays the published date.
Is there a way I can fix Google to show the actual updated date? Thanks for any help.
- The topic ‘Structured Data Errors: Published vs Updated Dates’ is closed to new replies.