cialis online pharmacy generic xenical cheap cialis online cialis generic viagra online in canada buy cheap levitra online cialis without a perscription order viagra uk no prescription flagyl cheap generic levitra buying viagra in the uk cheap viagra approved cialis deltasone online buy viagra online without prescription non prescription cialis buy orlistat uk buy cialis in india prednisone 60 mg female viagra online buy viagra without prescription celebrex prescriptions buy cialis canada best prices viagra alternative to prednisone cheapest generic levitra levitra 5mg cheap viagra cialis on line buy xenical without prescription online accutane canadian health care prednisone no prescreption viagra online generic female viagra europe buy cialis low price cheap india viagra

Add Breadcrumbs Without A Plugin In WordPress

Using breadcrumbs for page navigation is a great way to let your visitors know where they are and where they came from as they navigate your website; it gives them an idea of your site’s page hierarchy. Plus, did you know that it is also one way to optimize your site for search engines as well?

Here’s a pretty neat way of adding breadcrumbs to your WordPress site without using any plugin. Just copy and then paste the following code below into your functions.php file.

function the_breadcrumb() {
echo '<ul id="crumbs">';
if (!is_home()) {
echo '<li><a href="';
echo get_option('home');
echo '">';
echo 'Home';
echo "</a></li>";
if (is_category() || is_single()) {
echo '<li>';
the_category(' </li><li> ');
if (is_single()) {
echo "</li><li>";
the_title();
echo '</li>';
}
} elseif (is_page()) {
echo '<li>';
echo the_title();
echo '</li>';
}
}
elseif (is_tag()) {single_tag_title();}
elseif (is_day()) {echo"<li>Archive for "; the_time('F jS, Y'); echo'</li>';}
elseif (is_month()) {echo"<li>Archive for "; the_time('F, Y'); echo'</li>';}
elseif (is_year()) {echo"<li>Archive for "; the_time('Y'); echo'</li>';}
elseif (is_author()) {echo"<li>Author Archive"; echo'</li>';}
elseif (isset($_GET['paged']) && !empty($_GET['paged']))
{echo "<li>Blog Archives"; echo'</li>';}
elseif (is_search()) {echo"<li>Search Results"; echo'</li>';}
echo '</ul>';
}    

And then copy and paste this one anywhere in your theme files to display the breadcrumbs.

<?php the_breadcrumb(); ?>

That’s it. You’re done!

 

Related Posts

Themeum’s Flat Theme Multipurpose WordPress Theme

Weblizar Premium Responsive Theme

Automattic Buys WooCommerce Plugin for WordPress

Localbiz Business Theme for WordPress

4 Comments

  1. It’s a shame you don’t have a donate button! I’d definitely donate to this outstanding blog! I guess for now i’ll settle
    for book-marking and adding your RSS feed to my Google account.
    I look forward to fresh updates and will talk
    about this website with my Facebook group. Chat soon!

  2. Google Ranking

    02.18.2013

    Very nice blog post. I absolutely love this site.

    Keep writing!

  3. Ross

    02.20.2013

    Hi there would you mind stating which blog platform you’re using? I’m planning to start my own blog soon but I’m having a difficult time deciding between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your design and style seems different then most blogs and I’m looking for something completely unique.
    P.S My apologies for being off-topic but I
    had to ask!

  4. Delbert

    02.20.2013

    Hey! Do you know if they make any plugins to assist with SEO?
    I’m trying to get my blog to rank for some targeted keywords but I’m not seeing very good results.

    If you know of any please share. Appreciate it!