Best 2 Know

The Ultimate Blogging Resource

  • Advertising
  • WebHosting
  • Contact Us
  • Blogger
    • Blogger Templates
    • Blogger Tutorials
  • Browser
    • Firefox
    • Google Chrome
  • Google
  • Internet
    • Facebook
    • Twitter
  • Thesis
  • Windows
  • WordPress
    • WordPress Themes
    • WordPress Plugins
  • More
    • Linux
    • Review
    • Solutions
    • Announcements

How to add Breadcrumbs in thesis

breadcrumbsBreadcrumbs or Breadcrumb trail is a navigation aid used in user interfaces. It allows users to keep track of their locations within programs or documents. it provides you great SEO (Search Engine Optimization) rank flow , Increases page views and great user Interface.

Why not use plugins for Breadcrumbs

using plugins for making Breadcrumbs increases Query which results in increase in loading time of the blog. instead you can use the small PHP code for making Breadcrumb.

Installation :

  1. Login to WordPress Dashboard
  2. Navigate through Thesis >> Custom File Editor
  3. Now select custom_functions.php and add below code:
    function thesis_breadcrumbs() {
    	echo '';
    	bloginfo('name');
    	echo "";
    		if (is_category() || is_single()) {
    			echo "  »  ";
    			the_category(' • ');
    				if (is_single()) {
    					echo "   »   ";
    					the_title();
    				}
            } elseif (is_page()) {
                echo "  »  ";
                echo the_title();
    		} elseif (is_search()) {
                echo "  »  Search Results for... ";
    			echo '"<em>';
    			echo the_search_query();
    			echo '</em>"';
            }
        }
    function display_breadcrumbs() {
    ?><div class="breadcrumbs"><?php thesis_breadcrumbs(); ?></div><?php
    	}
     
    add_action('thesis_hook_after_header','display_breadcrumbs');

    function thesis_breadcrumbs() { echo ''; bloginfo('name'); echo ""; if (is_category() || is_single()) { echo "&nbsp;&nbsp;&#187;&nbsp;&nbsp;"; the_category(' &bull; '); if (is_single()) { echo " &nbsp;&nbsp;&#187;&nbsp;&nbsp; "; the_title(); } } elseif (is_page()) { echo "&nbsp;&nbsp;&#187;&nbsp;&nbsp;"; echo the_title(); } elseif (is_search()) { echo "&nbsp;&nbsp;&#187;&nbsp;&nbsp;Search Results for... "; echo '"<em>'; echo the_search_query(); echo '</em>"'; } } function display_breadcrumbs() { ?><div class="breadcrumbs"><?php thesis_breadcrumbs(); ?></div><?php }add_action('thesis_hook_after_header','display_breadcrumbs');

  4. Now comes the part of the CSS , so just add the below code in custom.css :
    .custom .breadcrumbs {
    	font-family:Verdana,Arial;
    	font-size:1.2em;
    	padding:1.2em 1em 1em 1em;
    	border-bottom:1px dotted #666;
    	border-top:1px dotted #666;
    }
    .custom .breadcrumbs a {
    	color:#cc0000;
    	border-bottom:1px dotted #fff;
    }
    .custom .breadcrumbs a:hover {
    	border-bottom:1px dotted #cc0000;
    }

    .custom .breadcrumbs { font-family:Verdana,Arial; font-size:1.2em; padding:1.2em 1em 1em 1em; border-bottom:1px dotted #666; border-top:1px dotted #666; } .custom .breadcrumbs a { color:#cc0000; border-bottom:1px dotted #fff; } .custom .breadcrumbs a:hover { border-bottom:1px dotted #cc0000; }

Customization :

How to change Breadcrumb separator ?
The default Separator is ” » ” to change it , just find for “&#187;” (without Quotes) and replace it with any desire Separator you want.

How to remove my Blog name from the start and replace it with Home ?
Find for bloginfo(‘name’); at line 5 and replace it with echo ‘Home’;

or Just replace the whole code with the below one :

function thesis_breadcrumbs() {
	echo '';
	echo 'Home';
	echo "";
		if (is_category() || is_single()) {
			echo "&nbsp;&nbsp;&#187;&nbsp;&nbsp;";
			the_category(' &bull; ');
				if (is_single()) {
					echo " &nbsp;&nbsp;&#187;&nbsp;&nbsp; ";
					the_title();
				}
        } elseif (is_page()) {
            echo "&nbsp;&nbsp;&#187;&nbsp;&nbsp;";
            echo the_title();
		} elseif (is_search()) {
            echo "&nbsp;&nbsp;&#187;&nbsp;&nbsp;Search Results for... ";
			echo '"<em>';
			echo the_search_query();
			echo '</em>"';
        }
    }
function display_breadcrumbs() {
?><div class="breadcrumbs"><?php thesis_breadcrumbs(); ?></div><?php
	}
 
add_action('thesis_hook_after_header','display_breadcrumbs');

function thesis_breadcrumbs() { echo ''; echo 'Home'; echo ""; if (is_category() || is_single()) { echo "&nbsp;&nbsp;&#187;&nbsp;&nbsp;"; the_category(' &bull; '); if (is_single()) { echo " &nbsp;&nbsp;&#187;&nbsp;&nbsp; "; the_title(); } } elseif (is_page()) { echo "&nbsp;&nbsp;&#187;&nbsp;&nbsp;"; echo the_title(); } elseif (is_search()) { echo "&nbsp;&nbsp;&#187;&nbsp;&nbsp;Search Results for... "; echo '"<em>'; echo the_search_query(); echo '</em>"'; } } function display_breadcrumbs() { ?><div class="breadcrumbs"><?php thesis_breadcrumbs(); ?></div><?php }add_action('thesis_hook_after_header','display_breadcrumbs');

How to change Color , Font Size and etc ?
All that is too be customized using CSS

Now we have Successfully Installed and Customized Breadcrumbs. Hope you like the Breadcrumbs if you have any idea or need any modifications then just contact me.

Subscribe via Email

Share this:

  • Twitter
  • Facebook
  • Pocket
  • Print
  • Email

Related

April 22, 2011 Ritesh Sanap Thesis Customization breadcrumb, Breadcrumbs, custom_functions.php, Thesis, Thesis Customization

Post navigation

Previous Previous post: Blue Statement Thesis Theme
Next Next post: How to add avatar next to post title in thesis

Currently Trending

  • Windows Vista CD key
  • How to download Specific parts of YouTube videos
  • How to download torrents without utorrent
  • How to Increase Dropbox upload speed
  • How to Add Breadcrumb for blogger blog
  • List Of All 255 Keyboard All Alt Key Codes
  • Google 2-Step Verification
  • How to add Attribution widget in blogger
  • How to retrieve my Demonoid username
  • You might also like this Widget for blogger or Related post widget

Random Posts

How to add Breadcrumbs in thesis

April 22, 2011 By Ritesh Sanap 10 Comments

How to Insert custom content after each post

March 19, 2011 By Ritesh Sanap Leave a Comment

How to increase twitter followers !

July 20, 2009 By Ritesh Sanap 5 Comments

Google 2-Step Verification

May 2, 2011 By Ritesh Sanap 5 Comments

Change From .co.in to .com in orkut – Enjoy Better orkuting

July 16, 2008 By Ritesh Sanap Leave a Comment

WordPress

HTTP2 Server Push for W3 Total Cache Minify plugin

August 17, 2016 By Ritesh Sanap 5 Comments

How to Disable Emojis in WordPress

January 6, 2016 By Ritesh Sanap Leave a Comment

JetPack Related posts and Sharing not working with NGINX

November 10, 2015 By Ritesh Sanap Leave a Comment

Simply Pure – WordPress Theme

November 2, 2014 By Ritesh Sanap 2 Comments

Advanced What should we Write about next? – WordPress Plugin

July 28, 2014 By Ritesh Sanap Leave a Comment

How to Disable Self Pingback or TrackBack

January 16, 2014 By Ritesh Sanap Leave a Comment

BlueStrap – WordPress Theme

January 1, 2014 By Ritesh Sanap 15 Comments

How to Create Multiple Excerpts in WordPress

December 24, 2013 By Ritesh Sanap Leave a Comment

How to Disable Auto Update in WordPress

November 21, 2013 By Ritesh Sanap Leave a Comment

How to Delete Feedbacks from JetPack Contact Form

November 19, 2013 By Ritesh Sanap 9 Comments

Recent Posts

  • HTTP2 Server Push for W3 Total Cache Minify plugin
  • How to show hidden files and folders in Mac OS X
  • How to Disable Emojis in WordPress
  • Canva – Online Photo Editor
  • JetPack Related posts and Sharing not working with NGINX

Archives

Recommends

  • DigitalOcean – Cloud Hosting
  • Dropbox – Cloud Storage
  • Elegant Themes – WordPress Themes
  • LastPass – Password Manager
  • Like us on Facebook
  • Follow on Twitter
  • +1 on Google
  • Subscribe via Email
  • RSS Feed

© 2021 Best 2 Know · All Rights Reserved · We ♥ DigitalOcean

loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.