Add WordPress Breadcrumbs Without Plugin

Add Tool

Create WordPress Breadcrumbs Without Plugin


Create WordPress Breadcrumbs Without Plugin

We recommend you to add WordPress Breadcrumbs to your Theme. It is a very good addition to the design because of usability and it also provides SEO benefits because it links to the path hence increasing bot activity in page indexing. Breadcrumbs provide a way to easily navigate through site, from post, to category, to the next post, or from child page, to parent page etc. Here I will trying to present add WordPress breadcrumbs without plugin. But why we do not add Plugin to display breadcrumbs for WordPress ? My answer is Some Client want to avoid using Plugins in their website. If you want to use Plugin you can Download WordPress breadcrumb plugin

However Learn how to add WordPress breadcrumbs without plugin by following the below steps: To add breadcrumb we need to edit:

  1. Functions.php
  2. Single.php
  3. Style.css

Step-1: open functions.php file of your current WordPress template and add the below codes.

<?php
function the_breadcrumb() {
        echo '<ul>';
    if (!is_home()) {
        echo '<li><b>You are here:</b> <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>';
}
?>

Step-2: open single.php file of your current WordPress template and add the below codes where you want to display. I have used it at above of post title. If you want to display this breadcrumb in category, archive, page, search etc pages simply add this code.

<?php the_breadcrumb(); ?>

Step-3: open style.css file of your current WordPress template and add the below codes in your style sheet.

.breadcrumbs { color: #999999; height: 22px; margin: 5px 0; overflow:hidden; font-size:11px; }
.breadcrumbs li { float:left; margin-right:5px; }
.breadcrumbs a { display: inline-block; text-decoration: underline; padding: 1px 5px 2px; }
.breadcrumbs a:hover { background: #333; color: #fff; }

Now reload you single page you will see your site breadcrumb is displayed.

I think This WordPress breadcrumb tutorial will help you to Find where to get bread crumbs ?

Write your opinions and help us and our guest to learn more and more. Don’t forget to share this tutorial with your Facebook, Google plus, twitter site. You can get our up to date with us by entering your email address in the Our Email subscription box.

Download WordPress Breadcrumbs Plugins

Breadcrumb NavXT RDFa Breadcrumb Yoast Breadcrumbs


Tags: wordpress breadcrumbs, breadcrumbs wordpress, wordpress breadcrumb, breadcrumb wordpress, breadcrumbs in wordpress, breadcrumbs in wordpress, wp breadcrumb
Payza

About Masum Billah

Create WordPress Breadcrumbs Without Plugin 1stWebSuite website seo tool is a free website ranking tool site provides a lot of on page and off page seo useful tools for you. On this site, we have a large number of website ranking tools


SIGN UP TO GET UPDATE TO YOUR INBOX




Discuss about: Add WordPress Breadcrumbs Without Plugin


adf.ly