Fixes undefined error on breadcrumb.
This commit is contained in:
parent
f9594a2836
commit
8ff6b58934
File diff suppressed because one or more lines are too long
|
@ -87,12 +87,14 @@ function tainacan_interface_the_breadcrumb() {
|
||||||
echo '<a href="'. esc_url(get_post_type_archive_link('tainacan-collection')) .'">';
|
echo '<a href="'. esc_url(get_post_type_archive_link('tainacan-collection')) .'">';
|
||||||
_e( 'Collections', 'tainacan-interface' );
|
_e( 'Collections', 'tainacan-interface' );
|
||||||
echo '</a> ' . $delimiter . ' ';
|
echo '</a> ' . $delimiter . ' ';
|
||||||
|
$str = '';
|
||||||
|
if ( ($post_type) ) {
|
||||||
if (is_post_type_archive()) {
|
if (is_post_type_archive()) {
|
||||||
$str = $post_type->labels->singular_name;
|
$str = $post_type->labels->singular_name;
|
||||||
} else {
|
} else {
|
||||||
$str = __('All items', 'tainacan-interface');
|
$str = __('All items', 'tainacan-interface');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
echo $before . $str . $after;
|
echo $before . $str . $after;
|
||||||
} else {
|
} else {
|
||||||
if ( is_archive() ) {
|
if ( is_archive() ) {
|
||||||
|
|
Loading…
Reference in New Issue