如何:Wordpress的Breadcrumb函数

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了如何:Wordpress的Breadcrumb函数相关的知识,希望对你有一定的参考价值。

  1. function the_breadcrumb() {
  2. if (!is_home()) {
  3. echo '<a href="';
  4. echo get_option('home');
  5. echo '">';
  6. bloginfo('name');
  7. echo "</a> » ";
  8. if (is_category() || is_single()) {
  9. the_category('title_li=');
  10. if (is_single()) {
  11. echo " » ";
  12. the_title();
  13. }
  14. } elseif (is_page()) {
  15. echo the_title();
  16. }
  17. }
  18. }
  19.  
  20.  
  21.  
  22. <?php the_breadcrumb(); ?>

以上是关于如何:Wordpress的Breadcrumb函数的主要内容,如果未能解决你的问题,请参考以下文章