Created
March 21, 2015 13:33
-
-
Save onjee/a7331754f2ddbfef91db to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function the_breadcrumb() { | |
echo ''; | |
if (!is_home()) { | |
echo '<a href="'; | |
echo get_option('home'); | |
echo '">'; | |
echo 'Home'; | |
echo "</a> » "; | |
if (is_category() || is_single()) { | |
the_category('title_li='); | |
if (is_single()) { | |
echo " » "; | |
the_title(); | |
} | |
} elseif (is_page()) { | |
echo the_title(); | |
} | |
elseif (is_tag()) { | |
single_tag_title(); | |
} | |
elseif (is_day()) { | |
echo "Archive for "; the_time('F jS, Y'); | |
} | |
elseif (is_month()) { | |
echo "Archive for "; the_time('F, Y'); | |
} | |
elseif (is_year()) { | |
echo "Archive for "; the_time('Y'); | |
} | |
elseif (is_author()) { | |
echo "Author Archive"; | |
} | |
elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { | |
echo "Blog Archives"; | |
} | |
elseif (is_search()) { | |
echo "Search Results"; | |
} | |
elseif (is_404()) { | |
echo "404 Error"; | |
} | |
}else{ | |
echo '<a href="'; | |
echo get_option('home'); | |
echo '">'; | |
echo 'Home'; | |
echo "</a>"; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment