Fix duplicate 'home' in body_class
This commit is contained in:
@@ -588,6 +588,10 @@ function roots_body_class() {
|
|||||||
$cat = get_the_category();
|
$cat = get_the_category();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (is_front_page()) {
|
||||||
|
return; // Avoid duplicate 'home' class when using static front page
|
||||||
|
}
|
||||||
|
|
||||||
if(!empty($cat)) {
|
if(!empty($cat)) {
|
||||||
return $cat[0]->slug;
|
return $cat[0]->slug;
|
||||||
} elseif (isset($term->slug)) {
|
} elseif (isset($term->slug)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user