CNAME for custom domain names are not supported yet.
array(1) { [0]=> array(5) {
[0]=> array(4) { ["label"]=> string(50) "Главная" ["link"]=> string(25) "https://test.site" ["title"]=> string(50) "Главная" ["type"]=> string(9) "blog_home" }
[1]=> array(4) { ["label"]=> string(27) "Вопросы-Ответы" ["link"]=> string(41) "https://test.site/knowledge-base/" ["title"]=> string(27) "Вопросы-Ответы" ["type"]=> string(7) "kb_home" }
[2]=> array(4) { ["label"]=> string(30) "Авто" ["link"]=> string(49) "https://test.site/help/auto/" ["title"]=> string(76) "Просмотреть все записи в Авто" ["type"]=> string(6) "kb_tax" }
[3]=> array(4) { ["label"]=> string(39) "Седан" ["link"]=> string(51) "https://test.site/help/sedan/" ["title"]=> string(85) "Просмотреть все записи в Седан" ["type"]=> string(6) "kb_tax" }
[4]=> array(4) { ["label"]=> string(60) "AUDI" ["link"]=> string(58) "https://test.site/audi/" ["title"]=> string(60) "AUDI" ["type"]=> string(15) "kb_current_page" } } }
<?php foreach ($breadcrumbs_paths as $index => $paths): ?>
<ol class="hkb-breadcrumbs" itemscope itemtype="http://schema.org/BreadcrumbList">
<?php $last_item_index = count($paths)-1; ?>
<?php foreach ($paths as $key => $component): ?>
<?php if( $component['label'] == 'Вопросы-Ответы' ) continue; ?>
<?php if ($last_item_index==$index) { ?>
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<span itemprop="name">
<?php echo $component['label']; ?></span>
<meta itemprop="position" content="<?php echo $key+1; ?>" />
</li>
<?php } else { ?>
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<a itemprop="item" href="<?php echo $component['link']; ?>" title="<?php echo $component['title']; ?>">
<span itemprop="name">
<?php echo $component['label']; ?></span>
</a>
<meta itemprop="position" content="<?php echo $key+1; ?>" />
</li>
<?php } ?>
<?php endforeach; ?>
</ol>
<?php endforeach; ?>
<a>
не нужен <?php foreach ($breadcrumbs_paths as $index => $paths): ?>
<ol class="hkb-breadcrumbs" itemscope itemtype="http://schema.org/BreadcrumbList">
<?php $last_item_index = count($paths)-1; ?>
<?php foreach ($paths as $key => $component): ?>
<?php if( $component['label'] == 'Вопросы-Ответы' ) continue; ?>
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<a itemprop="item" href="<?php echo $component['link']; ?>" title="<?php echo $component['title']; ?>">
<span itemprop="name"><?php echo $component['label']; ?></span>
</a>
<meta itemprop="position" content="<?php echo $key+1; ?>" />
</li>
<?php endforeach; ?>
</ol>
<?php endforeach; ?>
<?php $last_item_index = count($paths)-1; ?> //номер последнего элемента
if ($last_item_index==$index) //проверяем последний ли элемент
{
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
//убрали a теперь это не ссылка
<span itemprop="name"><?php echo $component['label']; ?></span>
<meta itemprop="position" content="<?php echo $key+1; ?>" />
</li>
} else { //если не последний
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<a itemprop="item" href="<?php echo $component['link']; ?>" title="<?php echo $component['title']; ?>">
<span itemprop="name"><?php echo $component['label']; ?></span>
</a>
<meta itemprop="position" content="<?php echo $key+1; ?>" />
</li>
}
<?php foreach ($paths as $key => $component): ?>
<?php $breadcrumbs_paths = ht_kb_get_ancestors(); ?>
<?php foreach ($breadcrumbs_paths as $index => $paths): ?>
<ol class="hkb-breadcrumbs" itemscope itemtype="http://schema.org/BreadcrumbList">
<?php $last_item_index = count($paths)-1; ?>
<?php if ($last_item_index==$index) { ?>
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<span itemprop="name">
<?php echo $component['label']; ?></span>
<meta itemprop="position" content="<?php echo $key+1; ?>" />
</li>
<?php } else { ?>
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<a itemprop="item" href="<?php echo $component['link']; ?>" title="<?php echo $component['title']; ?>">
<span itemprop="name">
<?php echo $component['label']; ?></span>
</a>
<meta itemprop="position" content="<?php echo $key+1; ?>" />
</li>
<?php } ?>
</ol>
<?php endforeach; ?>