为了账号安全,请及时绑定邮箱和手机立即绑定

wordpress 主题怎么添加面包屑导航

wordpress 主题怎么添加面包屑导航

不负相思意 2019-03-27 16:17:05
wordpress 主题怎么添加面包屑导航
查看完整描述

4 回答

?
陪伴而非守候

TA贡献1757条经验 获得超8个赞


1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

<div class="mbx-dh"> 

<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>


 


查看完整回答
反对 回复 2019-03-29
  • 4 回答
  • 0 关注
  • 1640 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信