Skip to content

Instantly share code, notes, and snippets.

Created January 17, 2012 23:54
What would you like to do?
Remove hentry from post_class()
* Remove 'hentry' from post_class()
function ja_remove_hentry( $class ) {
$class = array_diff( $class, array( 'hentry' ) );
return $class;
add_filter( 'post_class', 'ja_remove_hentry' );
Copy link

Reason why this code does NOT work is: it removes hentries from posts, when in reality it needs to remove from pages, categories and tags.
If anything, removing hentries from posts might HURT your SEO results: hentries are designed to capture articles' meta data so that's exactly where you want it to show.

I posted here code that does removes hentries from pages categories and tags:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment