Created
January 17, 2012 23:54
-
-
Save jaredatch/1629862 to your computer and use it in GitHub Desktop.
Remove hentry from post_class()
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
<?php | |
/** | |
* 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' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: https://github.com/andpiazza/remove_hentry_wordpress