function the_breadcrumb() {
global $post;
if (!is_front_page()) {
echo '<li><a href="';
echo get_option('home');
echo '">Главная';
echo "</a></li> ";
if (is_category() || is_single() || is_tax()) {
$categories = wp_get_post_terms( $post->ID, "tip );
if (empty($categories)) {$categories = get_the_category();}
echo '<li'.((is_single())?'><a href="'.
esc_url(get_term_link($categories[0]->slug,$categories[0]->taxonomy)) . '">':' class="active">');
echo esc_html($categories[0]->name);
echo ((is_single())?'</a>':'').'</li>';
if (is_single()) {
echo '<li class="active">';
the_title();
echo "</li>";
}
} elseif (is_page()) {
// Standard page
if( $post->post_parent ){
// If child page, get parents
$anc = get_post_ancestors( $post->ID );
// Get parents in the right order
$anc = array_reverse($anc);
// Parent page loop
if ( !isset( $parents ) ) $parents = null;
foreach ( $anc as $ancestor ) {
$parents .= '<li><a href="' . get_permalink($ancestor) . '" title="' . get_the_title($ancestor) . '">' . get_the_title($ancestor) . '</a></li>';
}
// Display parent pages
echo $parents;
// Current page
echo '<li class="active">'. get_the_title() . '</li>';
}
else {
// Just display current page if not parents
echo '<li class = "active">'. get_the_title() . '</li>';
}
}
else {
echo 'Home';
}
}}
function the_truncated_post($symbol_amount) {
$filtered = strip_tags( preg_replace('@<style[^>]*?>.*?</style>@si', '', preg_replace('@<script[^>]*?>.*?</script>@si', '', apply_filters('the_content', get_the_content()))) );
echo substr($filtered, 0, strrpos(substr($filtered, 0, $symbol_amount), ' ')) . '...';
}
<?$APPLICATION->IncludeComponent(
"bitrix:search.page",
"shop",
Array(
"AJAX_MODE" => "N",
"AJAX_OPTION_ADDITIONAL" => "",
"AJAX_OPTION_HISTORY" => "N",
"AJAX_OPTION_JUMP" => "N",
"AJAX_OPTION_STYLE" => "Y",
"CACHE_TIME" => "36000000",
"CACHE_TYPE" => "A",
"CHECK_DATES" => "N",
"COMPONENT_TEMPLATE" => "shop",
"COMPOSITE_FRAME_MODE" => "A",
"COMPOSITE_FRAME_TYPE" => "AUTO",
"DEFAULT_SORT" => "rank",
"DISPLAY_BOTTOM_PAGER" => "Y",
"DISPLAY_TOP_PAGER" => "N",
"FILTER_NAME" => "",
"NO_WORD_LOGIC" => "N",
"PAGER_SHOW_ALWAYS" => "Y",
"PAGER_TEMPLATE" => "",
"PAGER_TITLE" => "Результаты поиска",
"PAGE_RESULT_COUNT" => "25",
"PATH_TO_USER_PROFILE" => "",
"RATING_TYPE" => "",
"RESTART" => "N",
"SHOW_ITEM_DATE_CHANGE" => "Y",
"SHOW_ITEM_TAGS" => "Y",
"SHOW_ORDER_BY" => "Y",
"SHOW_RATING" => "",
"SHOW_TAGS_CLOUD" => "N",
"SHOW_WHEN" => "N",
"SHOW_WHERE" => "N",
"TAGS_INHERIT" => "Y",
"USE_LANGUAGE_GUESS" => "Y",
"USE_SUGGEST" => "N",
"USE_TITLE_RANK" => "N",
"arrFILTER" => array(0=>"iblock_aspro_mshop_catalog",),
"arrFILTER_iblock_aspro_mshop_catalog" => array(0=>"all",),
"arrFILTER_iblock_catalog" => array(0=>"all",),
"arrFILTER_iblock_product" => array(0=>"31",),
"arrFILTER_main" => ""
)
);?>
а если просто смотреть этот каталог, без поиска и кликнуть на какой-то товар, есть переход в детальный просмотр?
настройте правильные пути, тогда будет открываться нужная страница