Created
August 10, 2018 05:37
-
-
Save andpiazza/8e12d930c8bdadf79220a51b4f4b1d5a to your computer and use it in GitHub Desktop.
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)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment