Created
October 8, 2012 06:28
-
-
Save flashingcursor/3851021 to your computer and use it in GitHub Desktop.
Strip hentry from WordPress posts...
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 the hentry class from posts in WordPress - could really remove any class using various class filters, | |
* like body_class using this technique. | |
* | |
* @param array $classes | |
* @return array | |
*/ | |
add_filter( 'post_class', 'fc_remove_hentry', 20 ); | |
function fc_remove_hentry( $classes ) { | |
if( ( $key = array_search( 'hentry', $classes ) ) !== false ) | |
unset( $classes[$key] ); | |
return $classes; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment