Posted By

gd6d on 02/05/10


Tagged

menu wordpress breadcrumb


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

maryann
maxvee8


How to: Breadcrumb function for Wordpress


 / Published in: PHP
 

URL: http://www.catswhocode.com/blog/how-to-breadcrumb-function-for-wordpress

  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(); ?>

Report this snippet  

You need to login to post a comment.