Fixes undefined error on breadcrumb.

This commit is contained in:
mateuswetah 2022-01-27 17:23:09 -03:00
parent f9594a2836
commit 8ff6b58934
2 changed files with 8 additions and 6 deletions

File diff suppressed because one or more lines are too long

View File

@ -87,11 +87,13 @@ function tainacan_interface_the_breadcrumb() {
echo '<a href="'. esc_url(get_post_type_archive_link('tainacan-collection')) .'">';
_e( 'Collections', 'tainacan-interface' );
echo '</a>&nbsp;' . $delimiter . '&nbsp;';
if (is_post_type_archive()) {
$str = $post_type->labels->singular_name;
} else {
$str = __('All items', 'tainacan-interface');
$str = '';
if ( ($post_type) ) {
if (is_post_type_archive()) {
$str = $post_type->labels->singular_name;
} else {
$str = __('All items', 'tainacan-interface');
}
}
echo $before . $str . $after;
} else {