diff --git a/src/functions/breadcrumb.php b/src/functions/breadcrumb.php index 9e9f40e..d180f7a 100644 --- a/src/functions/breadcrumb.php +++ b/src/functions/breadcrumb.php @@ -2,7 +2,7 @@ /** The breadcrumb function * Display parent and current page - **/ + **/ function tainacan_interface_the_breadcrumb() { $showOnHome = 0; // 1 - show breadcrumbs on the homepage, 0 - don't show $delimiter = '>'; // delimiter between crumbs @@ -73,7 +73,7 @@ function tainacan_interface_the_breadcrumb() { $parents = array_reverse($parents); // For each parent, create a breadcrumb item - foreach( $parents as $parent ) : + foreach ($parents as $parent): //$item = get_term_by( 'id', $parent, get_query_var( 'taxonomy' )); $url = get_term_link($parent); echo ' ' . $delimiter . ' '; @@ -84,9 +84,16 @@ function tainacan_interface_the_breadcrumb() { echo ' ' . $delimiter . ' '; echo $before . $term->name . $after; } elseif(!is_tax() && get_post_type() != 'tainacan-collection') { - echo ''; _e( 'Collections', 'tainacan-interface' ); echo ' ' . $delimiter . ' '; - - echo $before . $post_type->labels->singular_name . $after; + echo ''; + _e( 'Collections', 'tainacan-interface' ); + echo ' ' . $delimiter . ' '; + + if (is_post_type_archive()) { + $str = $post_type->labels->singular_name; + } else { + $str = __('All items', 'tainacan-interface'); + } + echo $before . $str . $after; } else { echo $before . $post_type->labels->singular_name . $after; } diff --git a/src/header.php b/src/header.php index 0eb19e7..a9193cb 100644 --- a/src/header.php +++ b/src/header.php @@ -47,7 +47,7 @@ -
+