Skip to content

Instantly share code, notes, and snippets.

View andpiazza's full-sized avatar

Andre Piazza andpiazza

View GitHub Profile
@andpiazza
andpiazza / gist:8e12d930c8bdadf79220a51b4f4b1d5a
Created August 10, 2018 05:37
Removes hentry class entries from Wordpress pages, categories and tags. SEO benefits for the website: eliminate related errors from Google Search Console > Structured Data > hatom (markup: microformats.org)
function themeslug_remove_hentry( $classes ) {
if ( is_page() OR is_category() OR is_tag()) {
$classes = array_diff( $classes, array( 'hentry' ) );
}
return $classes;
}
add_filter( 'post_class','themeslug_remove_hentry' );