Skip to content

Commit

Permalink
Fix duplicate 'home' in body_class
Browse files Browse the repository at this point in the history
  • Loading branch information
retlehs committed Apr 30, 2012
1 parent d4032f5 commit bb5e314
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions inc/roots-cleanup.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit bb5e314

Please sign in to comment.