wordpress 加面包屑


方法一:
安装插件:Breadcrumbs
加在header.php 文件最后加上:



让Yoast Breadcrumbs支持中文的方法

找到插件文件:wp-content/plugins/breadcrumbs/yoast-breadcrumbs.php
查找到这段代码:
1
$opt[$option_name] = htmlentities(html_entity_decode($_POST[$option_name]));

替换为:
1
$opt[$option_name] = htmlentities(html_entity_decode($_POST[$option_name], ENT_COMPAT, "UTF-8"), ENT_COMPAT, "UTF-8");





方法二:

加在header.php 文件最后  </div><!-- #header -->  后面


<div class="mbx-dh">
You are here: <a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a> &raquo;
<?php
if( is_single() ){
$categorys = get_the_category();
$category = $categorys[0];
echo( get_category_parents($category->term_id,true,' &raquo; ') );
the_title();
} elseif ( is_page() ){
the_title();
} elseif ( is_category() ){
single_cat_title();
} elseif ( is_tag() ){
single_tag_title();
} elseif ( is_day() ){
the_time('Y年Fj日');
} elseif ( is_month() ){
the_time('Y年F');
} elseif ( is_year() ){
the_time('Y年');
} elseif ( is_search() ){
echo $s.' 的搜索结果';
}
?>
</div>

Comments

Popular posts from this blog

potplayer 次字幕位置

emule kad 无法连接