Fixes repository level page breadcrumb (ref #40)

This commit is contained in:
Rodrigo de Oliveira 2021-04-25 00:43:31 -03:00
parent 217c100e7f
commit 5066905010
4 changed files with 484 additions and 272 deletions

View File

@ -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 '<a href="'. esc_url(get_post_type_archive_link('tainacan-collection')) .'">'; _e( 'Collections', 'tainacan-interface' ); echo '</a>&nbsp;' . $delimiter . '&nbsp;';
echo '<a href="'. esc_url(get_post_type_archive_link('tainacan-collection')) .'">';
_e( 'Collections', 'tainacan-interface' );
echo '</a>&nbsp;' . $delimiter . '&nbsp;';
echo $before . $post_type->labels->singular_name . $after;
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;
}

View File

@ -47,7 +47,7 @@
</nav>
<?php endif; ?>
<div class="btn-group" style="padding: 0.6rem 0rem;">
<div class="btn-group" style="padding: 0.6rem 0;">
<?php if (!get_theme_mod('tainacan_hide_search_input', false)) : ?>
<div class="dropdown tainacan-form-dropdown">

Binary file not shown.

File diff suppressed because it is too large Load Diff