From f53b9924c6711b6a618cec823a676f8695f32e95 Mon Sep 17 00:00:00 2001 From: Caleb Burks <19caleb95@gmail.com> Date: Tue, 1 Dec 2015 01:31:11 -0600 Subject: [PATCH] Fix breadcrumbs for taxonomies --- includes/class-wc-breadcrumb.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/includes/class-wc-breadcrumb.php b/includes/class-wc-breadcrumb.php index d812dea709a..a08194f2c33 100644 --- a/includes/class-wc-breadcrumb.php +++ b/includes/class-wc-breadcrumb.php @@ -278,7 +278,7 @@ class WC_Breadcrumb { } /** - * Add crumbs for date based archives. + * Add crumbs for taxonomies */ private function add_crumbs_tax() { $this_term = $GLOBALS['wp_query']->get_queried_object(); @@ -287,8 +287,7 @@ class WC_Breadcrumb { $this->add_crumb( $taxonomy->labels->name ); if ( 0 != $this_term->parent ) { - $this->term_ancestors( $this_term->parent, 'post_category' ); - $this->add_crumb( $this_term->name, get_term_link( $this_term->term_id, $this_term->taxonomy ) ); + $this->term_ancestors( $this_term->term_id, $this_term->taxonomy ); } $this->add_crumb( single_term_title( '', false ), get_term_link( $this_term->term_id, $this_term->taxonomy ) );