Hướng dẫn Hướng dẫn fix Breadcrum (Do Google update)

Thành viên quá tích cực
Quản trị viên
Bước 1: Tại file header_extended.tpl tìm dòng như sau
HTML:
<!-- BEGIN: breadcrumbs -->
                                <div class="breadcrumbs-wrap">
                                    <div class="display">
                                        <a class="show-subs-breadcrumbs hidden" href="#" onclick="showSubBreadcrumbs(this, event);"><em class="fa fa-lg fa-angle-right"></em></a>
                                        <ul class="breadcrumbs list-none"></ul>
                                    </div>
                                    <ul class="subs-breadcrumbs"></ul>
                                    <ul class="temp-breadcrumbs hidden">
                                        <li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="{THEME_SITE_HREF}" itemprop="url" title="{LANG.Home}"><span itemprop="title">{LANG.Home}</span></a></li>
                                        <!-- BEGIN: loop --><li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="{BREADCRUMBS.link}" itemprop="url" title="{BREADCRUMBS.title}"><span class="txt" itemprop="title">{BREADCRUMBS.title}</span></a></li><!-- END: loop -->
                                    </ul>
                                </div>
                                <!-- END: breadcrumbs -->
Sửa lại thành
HTML:
<div class="bread-crumb">
        <div class="breadcrumb-container">
            <div class="breadcrumb breadcrumbs-wrap">
                <div class="display">
                    <a class="show-subs-breadcrumbs hidden" href="#" onclick="showSubBreadcrumbs(this, event);"><em class="fa fa-lg fa-angle-right"></em></a>
                    <ul class="breadcrumbs list-none"></ul>
                </div>
                <ul class="subs-breadcrumbs"></ul>
                <ul class="temp-breadcrumbs hidden" itemscope itemtype="http://schema.org/BreadcrumbList">
                    <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a href="{THEME_SITE_HREF}" itemprop="item" title="{LANG.Home}"><span itemprop="name">{LANG.Home}</span></a><span itemprop="position" content="1"></span></li>
                    <!-- BEGIN: loop --><li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a href="{BREADCRUMBS.link}" itemprop="item" title="{BREADCRUMBS.title}"><span class="txt" itemprop="name">{BREADCRUMBS.title}</span></a><span itemprop="position" content="{STT_BR}"></span></li><!-- END: loop -->
                </ul>
            </div>
        </div>
    </div>
Bước 2: Tại file theme.php trong thư mục theme đang dùng tìm tới dòng (có thể dòng 280)
PHP:
if (!empty($array_mod_title_copy)) {
    foreach ($array_mod_title_copy as $arr_cat_title_i) {
        $xtpl->assign('BREADCRUMBS', $arr_cat_title_i);
        $xtpl->parse('main.breadcrumbs.loop');
    }
}
Sửa lại thành
PHP:
if (!empty($array_mod_title_copy)) {
    $stt = 2;
    foreach ($array_mod_title_copy as $arr_cat_title_i) {
        $xtpl->assign('STT_BR', $stt);
        $stt++;
        $xtpl->assign('BREADCRUMBS', $arr_cat_title_i);
        $xtpl->parse('main.breadcrumbs.loop');
    }
}
Lưu tất cả lại và dùng https://search.google.com/structured-data/testing-tool/u/0/?hl=vi để kiểm tra nhé !
 
Thích: hoanglongvnpt