remove hentry schema from wordpress pages

//remove hentry schema from wordpress pages

remove hentry schema from wordpress pages

By default, wordpress installs the hentry schema into all pages, whereas it should only be added for posts.

To fix, this you can add the following into your themes functions.php file

&nfunction themeslug_remove_hentry( $classes ) {
if ( is_page() ) {
$classes = array_diff( $classes, array( ‘hentry’ ) );
}
return $classes;
}
add_filter( ‘post_class’,’themeslug_remove_hentry’ );

 

 

By |2017-10-04T11:35:49+01:00October 4th, 2017|Wordpress|0 Comments