From 1f85e9b067b136c61e53b0540bc48e08c1c48b4f Mon Sep 17 00:00:00 2001 From: Caroline Moore Date: Wed, 16 Sep 2015 15:08:02 -0400 Subject: [PATCH 1/2] Add 'hfeed' class via body_class * Only add the 'hfeed' class when viewing a non-singular page, such as an index or archive --- inc/extras.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/inc/extras.php b/inc/extras.php index 5503d38d..971d0ba1 100644 --- a/inc/extras.php +++ b/inc/extras.php @@ -18,6 +18,11 @@ function _s_body_classes( $classes ) { if ( is_multi_author() ) { $classes[] = 'group-blog'; } + + // Adds a class of hfeed to non-singular pages. + if ( ! is_singular() ) { + $classes[] = 'hfeed'; + } return $classes; } From 3e8580d5187379a62a613b0abdf13c23d174165e Mon Sep 17 00:00:00 2001 From: Caroline Moore Date: Wed, 16 Sep 2015 15:09:09 -0400 Subject: [PATCH 2/2] Remove 'hfeed' class from header.php * This was moved to inc/extras.php to be added via body_class filter --- header.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/header.php b/header.php index ff6e3c2e..2aa34d5b 100644 --- a/header.php +++ b/header.php @@ -21,7 +21,7 @@ > -
+