correct parts in single-en

This commit is contained in:
argoexpert press
2024-05-26 11:50:52 +03:00
parent 1e64fd0032
commit 2ecc4e4089
5 changed files with 32 additions and 3 deletions

View File

@@ -26,7 +26,14 @@ array_push($categories, $firstElement);
<?php elseif (is_category()) : ?>
<span><?= $current_term->name; ?></span>
<?php elseif (is_single()) :?>
<span><?= get_cat_name($current_term_ids[0]); ?></span>
<span><?
$cat1 = get_cat_name($current_term_ids[0]);
if ( $cat1 !== 'en') {
echo $cat1;
} else {
echo get_cat_name($current_term_ids[1]);
}
?></span>
<?php else : ?>
<span>Parts</span>
<?php endif; ?>