Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

Commit

Permalink
Merge pull request #984 from roby94/breadcrumb
Browse files Browse the repository at this point in the history
Fix Category page breadcrumb
  • Loading branch information
olefredrik authored May 23, 2017
2 parents c00e8f8 + 4cca3a9 commit c28fd0b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion library/navigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ function foundationpress_breadcrumb( $showhome = true, $separatorclass = false )
} elseif ( is_category() ) {

// Category page
echo '<li class="item-current item-cat-' . $category[0]->term_id . ' item-cat-' . $category[0]->category_nicename . '"><strong class="bread-current bread-cat-' . $category[0]->term_id . ' bread-cat-' . $category[0]->category_nicename . '">' . $category[0]->cat_name . '</strong></li>';
// Get the current category
$current_category = $wp_query->queried_object;
echo '<li class="item-current item-cat-' . $current_category->term_id . ' item-cat-' . $current_category->category_nicename . '"><strong class="bread-current bread-cat-' . $current_category->term_id . ' bread-cat-' . $current_category->category_nicename . '">' . $current_category->cat_name . '</strong></li>';

} elseif ( is_page() ) {

Expand Down

0 comments on commit c28fd0b

Please sign in to comment.