Advertisement
Guest User

Untitled

a guest
Jul 30th, 2010
263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.13 KB | None | 0 0
  1. function breadcrumb()
  2. {
  3.  
  4. if (is_single()) {
  5. global $post;
  6. $category = get_the_category();
  7. $current_cat = $category[0]->cat_ID;
  8. //the_title();
  9. $t=$post->post_title;
  10. $markup = '
  11. <li class="freccia"><a href="'.get_option('home').'"><span>Homepage</span></a></li><li class="freccia"><em><span>
  12. '.get_category_parents($current_cat, FALSE, '</span></em></li><li><em><span>').$t.('</em></span></li>');'
  13. ';
  14.  
  15.  
  16. } elseif (is_category()) {
  17. $category = get_the_category();
  18. $current_cat = $category[0]->cat_ID;
  19. $markup = '
  20. <li class="freccia"><a href="'.get_option('home').'"><span>Homepage</span></a></li><li><em><span>
  21. '.get_category_parents($current_cat, FALSE, '</span></em></li>').'
  22. ';
  23. }
  24.  
  25.  
  26. elseif (is_home()) {
  27. $markup = '
  28. <li><a href="'.get_option('home').'"><span>Homepage</span></a></li>
  29. ';
  30. }
  31.  
  32. elseif (is_front_page()) {
  33. $markup = '
  34. <li><a href="'.get_option('home').'"><span>Homepage</span></a></li>
  35. ';
  36. }
  37.  
  38.  
  39. else {
  40. $currentpage = wp_title('',false,'');
  41. $markup = '<li class="freccia"><a href="'.get_option('home').'"><span>Homepage</span></a></li><li><em><span>'.$currentpage.'</span></em></li>';
  42. }
  43.  
  44. echo $markup;
  45.  
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement