Hi Andrew,
I noticed in Google Console that I have quite a few errors for missing author/title/updated. I found another thread in the support archives that recommended to install the code snippets plugin and cut/paste this code:
if ( ! function_exists( ‘ultra_post_class_filter’ ) ) :
/**
* Filter post classes.
* @link https://codex.wordpress.org/Function_Reference/post_class.
*/
function polestar_post_class_filter( $classes ) {
$classes[] = ‘post’;
// Resolves structured data issue in core. See https://core.trac.wordpress.org/ticket/28482.
if ( is_page() ) {
$class_key = array_search( ‘hentry’, $classes );
if ( $class_key !== false) {
unset( $classes[ $class_key ] );
}
}
$classes = array_unique( $classes );
return $classes;
}
endif;
add_filter( ‘post_class’, ‘ultra_post_class_filter’ );
I also set to “Only run on site front-end” as recommended. When I finished, I received the following error information above each post on my live blog page:
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘ultra_post_class_filter’ not found or invalid function name in /home7/aixplori/public_html/wp-includes/class-wp-hook.php on line 300
Warning: array_unique() expects parameter 1 to be array, null given in /home7/aixplori/public_html/wp-includes/post-template.php on line 545
Warning: join(): Invalid arguments passed in /home7/aixplori/public_html/wp-includes/post-template.php on line 423
class=””>
I’ve deactivated so that the ugly errors do not display in my blog page (https://www.aixploringprovence.com/blog-journal/) until I hopefully have a solution. Do you have any advice as to what I may be doing wrong?
Thanks.