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