Skip to content

Instantly share code, notes, and snippets.

@flashingcursor
Created October 8, 2012 06:28
Show Gist options
  • Save flashingcursor/3851021 to your computer and use it in GitHub Desktop.
Save flashingcursor/3851021 to your computer and use it in GitHub Desktop.
Strip hentry from WordPress posts...
<?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