How to show breadcrumbs without a plugin for Twenty Twelve Theme in WordPress

I am a huge technology lover. I will want to know about everything related to technology. I like to make everything with the pieces of codes. I love to code, debugging and many times got entangled in these sorts of programs that most projects especially WordPress and Android got intrigued and most of it does not work most times. While writing the posts of blog it does not come in the prior but it continues to find my memory through some sort of instant requirements of what should have been the need for sites and what should be done with it.

Why Are Breadcrumbs in Website necessary?

  • While moving to any shopping malls we first look at the categories mentioned and then we move towards our requisite categories and that is the way website works.
  • In my website, there are articles and continuing till to date and I have found there has been some sort of navigational difficulties while measuring my site with Google page rank tools.
  • I first failed to understand what it should have been but ultimately come to realize the importance of it.
  • I first see there has been the presence of pagination, read more, archive, categories, feed and so on but still unable to find what it could have been in terms of Google wanting to convey.
  • That is why the concept of breadcrumb comes to the upfront.

Why Are Breadcrumbs important to convey Google about relevance directory of article structure of the website?

  • The simple forms of breadcrumbs are very important as it conveys Google about the relevance of the series of navigation of any site such as, suppose you have written one article on WordPress and that is inside WordPress SEO.
  • With breadcrumb, while reaching the same spot on the site that should show that you are on the home page or from the front page towards the category of SEO and then towards the name of the article.
  • It does help Google to understand the relevance of site structure and also provides more lights on the aspect of understanding the website structures.
  • It helps Google and other search giants to understand the importance attached to your site and it helps search engines to understand the most possible way your site works.

Breadcrumbs without plugin:

  • In this post, I am going to elaborate in detail about how to install breadcrumb in twentytwelve theme.
  • This tutorial could be applied to all themes with some sort of editing.
  • How to show them on a single page, category pages, search pages.
  • This tutorial is all about how to install breadcrumb without cumbersome plugins.
  • We should learn about how to do this with a simple coding structure.
  • In this tutorial two PHP files will be edited, one being the functions dot PHP and the other being the header dot php.
  • I should expect you to be well guarded with the functionalities of editing of the website.
  • One should always do this from cPanel hostings and then files, then file manager, then wp-content and themes and then choose the currently activated theme.
  • It is always a good idea to back up edited theme files before editing and modifying.

Why the small piece of code is better than plugins:

  • There have been many plugins on breadcrumbs but with these simple tutorials you do not need to apply for any plugins but with this simple pieces of codes yours, WordPress breadcrumb navigation should work straightforward.
  • This code should show you dynamic breadcrumb code which means it should show you about which page you are landing and its hierarchical representation of where you are on the site.
  • This not only helpful for visitors but also very much helpful for search engines in detecting the exact location of the article.
  • It provides intuitive meanings to your website and enhances productivity and functionalities of your website to the maximum extent.
  • Visitors could easily reach towards the back of the page from where they reached and in this way thus enhancing the ultimate potential of the website to its maximum extent.

Breadcrumb on the website is good for search engine optimisation (SEO):

  • It provides some of the most wonderful aesthetic elements to showcase the beauty of the website to a greater extent.
  • Google search indexing feels very easier for indexing such web pages to a greater extent and slowly it improves better crawling of your website to provide and showcase one of the most widely anticipated search algorithms.
  • It is important you should always back up theme files when you implement such codes so that whenever you got it wrong then you could easily reverse it.
  • I test this coding in twentytwelve theme but am sure with a little bit of editing and other forms of code hacks this codes should work nicely with every theme.

How to show breadcrumbs without a plugin for Twenty Twelve Theme in WordPress?

  • Do not edit theme files from the WordPress administration.
  • Use cPanel hosting parameters for hosting purposes.
  • This hacking should work in two ways.
  • First edit the functions dot PHP by reaching from cPanel hosting and then for the appearance of breadcrumb you could use single dot PHP, category dot PHP, search dot PHP and so on.
  • If you wish to show it on every page except that of the home page of the blog then it is better to use it on header dot php.
  • Reached at the end of functions dot PHP file and then copy and paste this code and then save it.

1,Code snippet: Functions dot php

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>";
 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>';

2.Code snippet: header dot php

  • Search for the following code in header dot php
</nav><!-- #site-navigation -->
  • Then add the following code just above the above code (site navigation).
<?php the_breadcrumb(); ?>

Make breadcrumb work like site navigation:

  • This would make breadcrumb appear just like another menu under the primary menu structure.
  • If you want to show these on the side bar or at the end of the article then you can paste it on the sidebar dot php or single dot php instead of header dot php.
  • The proposed pasting of this code at header dot php is an example of showing the code at some location and you could be innovated
  • It could apply the second part of the code to anywhere you like so that ultimately, the choice is of yours.

The choice is yous keep experimenting:

  • Do not worry about the location of breadcrumbs shown on the site.
  • Keep experimenting at different places by putting the second part of the code on the website
  • Ultimately you could find the presence of the right areas where the breadcrumb
  • It should be very much comfortable for your liking.
  • It is up to you to find out the exact location.


  • I found it to be installed nearer to main navigation menu and that shows extremely comfortable for me/
  • It shows breadcrumb as the part of the navigational menu.
  • You could innovate and use it in the side bar, in the footer or at the end of the single article or at the beginning of the article.
  • The choice is with yours.
  • Why wait for this, as it is good for search engine optimization as well as it is good for visitors to know the category of the article.
  • So that they could stay or some more second at your article.
  • Do it on your own and ditch any breadcrumb plugins.
  • Be a smart code manager and a wonderful system administrator.

Related Posts:

Sources & References:


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.