Add 'hfeed' class via body_class

* Only add the 'hfeed' class when viewing a non-singular page, such as an index or archive
This commit is contained in:
Caroline Moore 2015-09-16 15:08:02 -04:00
parent b1b13f58d8
commit 1f85e9b067
1 changed files with 5 additions and 0 deletions

View File

@ -19,6 +19,11 @@ function _s_body_classes( $classes ) {
$classes[] = 'group-blog'; $classes[] = 'group-blog';
} }
// Adds a class of hfeed to non-singular pages.
if ( ! is_singular() ) {
$classes[] = 'hfeed';
}
return $classes; return $classes;
} }
add_filter( 'body_class', '_s_body_classes' ); add_filter( 'body_class', '_s_body_classes' );