Advertisement
niammuddin

menambah breadcrums wordpress

Jul 27th, 2017
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.99 KB | None | 0 0
  1. <?php
  2. // menambah breadcrums
  3. function get_breadcrumb() {
  4.     echo '<a href="'.home_url().'" rel="nofollow">Home</a>';
  5.     if (is_single()) {
  6.         echo "&nbsp;&nbsp;&#187;&nbsp;&nbsp;";
  7.         the_category(' &bull; ');
  8.         echo "&nbsp;&nbsp;&#187;&nbsp;&nbsp;";
  9.         the_tags('');
  10.         echo " &nbsp;&nbsp;&#187;&nbsp;&nbsp; ";
  11.         echo the_title();
  12.     } elseif (is_tag()) {
  13.         echo "&nbsp;&nbsp;&#187;&nbsp;&nbsp;";
  14.         the_tags('');
  15.     } elseif (is_category()) {
  16.         echo "&nbsp;&nbsp;&#187;&nbsp;&nbsp;";
  17.         the_category(' &bull; ');
  18.     } elseif (is_page()) {
  19.         echo "&nbsp;&nbsp;&#187;&nbsp;&nbsp;";
  20.         echo the_title();
  21.     } elseif (is_search()) {
  22.         echo "&nbsp;&nbsp;&#187;&nbsp;&nbsp;Download&nbsp;&nbsp;&#187;&nbsp;&nbsp;";
  23.         //echo '"<em>';
  24.         echo the_search_query();
  25.         //echo '</em>"';
  26.     } elseif (is_author()) {
  27.         echo "&nbsp;&nbsp;&#187;&nbsp;&nbsp;";
  28.         echo get_the_author();
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement