Archived topic
author and updated missing in google search console
5 replies · Started by dassana on October 7, 2018
hi tom
i am having this error on author and updated missing in google search console for all the categories and archive pages. reason being that i am not showing the author and updated date for the posts in the category pages.
i checked this link - https://generatepress.com/forums/topic/structured-data-errors-showing-in-google-search-console-webmaster-tools/
but its confusing for me. which code to add and where to add - to get rid of this error. should the code be added in hooks or in code snippets plugin.
Hi there,
You could try doing something like this to prevent the errors:
add_filter( 'post_class', function( $classes ) {
if ( is_archive() ) {
$classes = array_diff( $classes, array( 'hentry' ) );
}
return $classes;
} );
thanks tom. i will add and check. should in add in code snippets?
Yes :)
thanks tom.
No problem :)