I’m a huge food lover.
I’ll eat just about anything (within reason) and I love cooking. Therefore, it doesn’t take much to get my mind wandering to the topic of food, which is exactly what I think of whenever breadcrumbs are mentioned. However, I typically hear the word in the context of navigational aids rather than baked goods and today I want to talk about the former rather than the latter.
The simple fact is that breadcrumbs can be great for your site in terms of ease of navigation and can help Google to understand the relevance of your site to particular keywords. In this post I am going to explain exactly what breadcrumbs are and show you how to enable them on your site with the best SEO plugin available for WordPress.
What Are Breadcrumbs?
Breadcrumbs (also known as a “breadcrumb trail”) is a navigational aid that allows visitors to understand their current location in the context of a website. You’ve probably seen and used breadcrumbs hundreds of times before without even realizing it.
For instance, I’m currently selling my old laptop on eBay. Here’s a screenshot of the top of the lot’s page:
That text I’ve highlighted in orange is an example of a breadcrumb trail. As you can see, it gives visitors a hierarchical representation of where they are on the site.
There are a number of benefits to using breadcrumbs on your site:
- Usability: it gives users an intuitive means of browsing through your site
- Easy to backtrack: if your site is made up of many layers then breadcrumbs can make navigating through them far easier
- Aesthetics: breadcrumbs are a compact and attractive navigational element
- Context: breadcrumbs instantly give a vistor an idea of how the page they have landed on relates to the rest of the site
- SEO: Google will interpret your breadcrumbs and add them to the search engine results page
If you’re sold on the concept of breadcrumbs and are ready to implement them on your site, read on!
Implementing Breadcrumbs
In order to include dynamic breadcrumbs on all relevant pages on your site you first need to install WordPress SEO by Yoast. In my opinion this plugin is by far the best total SEO solution for WordPress and should take pride of place on your blog. If you’d like to know more about the plugin then check out our two part guide:
- A Complete Guide to WordPress SEO by Yoast [Part I]
- A Complete Guide to WordPress SEO by Yoast [Part II]
Implementing breadcrumbs with the plugin is relatively technical process but should be pretty easy for you to figure out.
Step 1: Enable Breadcrumbs
You can enable breadcrumbs by navigating to SEO > Internal Links via the sidebar on your WordPress dashboard. You’ll see a page like this:
As you can see you first need to check the box to enable breadcrumbs. You may then want to adjust the settings to your liking, although no changes are actually necessary.
Step 2: Locate the Relevant PHP File
In order to activate breadcrumbs you need to insert a small piece of code into the right PHP file within your theme directory. Don’t worry — this isn’t as scary as it sounds.
First decide which page(s) you want breadcrumbs to display on — for most of you that will be the blog post page. Then download and install the excellent What the File plugin. Navigate to any blog post page on your site and you will notice “What the File” has appeared in your toolbar. Hover over it and you’ll be told what PHP file is being used to serve up the body of content on that page:
The blog post page will almost always be single.php but it doesn’t hurt to check.
Step 3: Install the Code
Now it’s time to get hold of the code that you need to paste into your PHP file — you’ll find it at the bottom of the Internal Links settings page you accessed above. It’ll look like this:
<?php if ( function_exists('yoast_breadcrumb') ) { yoast_breadcrumb('<p id="breadcrumbs">','</p>'); } ?>
Basically, this code is saying “if breadcrumbs are activated, show them.” Simple, right?
Installing the code is just a simple copy and paste job into your PHP file. You can access the file via FTP. If you’re not sure how to do this then consult this WordPress.org guide and find out FTP login details from your hosting provider. Please never edit PHP files from within WordPress — if you break anything you won’t be able to access your site.
Once you have FTP access to your site navigate to “/wp-content/themes/your-theme-name/”. You’ll find all of the PHP files relating to your theme within that directory. If you have not already created a child theme then do so now. Simply open the relevant PHP file, insert the code in the location that you would like the breadcrumbs to appear on your site, then re-upload the file to your server. Don’t worry about the breadcrumbs showing up in the wrong place — if they do then just experiment until you get the placement right.
That’s it! Here’s an example of breadcrumbs successfully installed on an online dating blog of mine:
Looks good, right? It helps the user, looks good on the page, boosts your SEO prospects and much more. What are you waiting for?
Anisa
How do breadcrumbs work if the post is in two categories?
Manogna
Thanks for the article. Now I knew very much about breadcrumbs and how important they are.Thanks a lot
Phong kham nam khoa
Thanks bro, this was very helpful
dung
Breadcrumbs in Yoast SEO plugin failed when applied in the page, do you have any solution?
Tasim
Work on My site, but how to remove breadcrumbs on home page ?
humshumzy
wow i just tested this breadcrumbs and it really works
Thanks a lot
Musang
Thanks for explaining this, however I have a problem with implementation this into my theme where there is ready widget for breadcrumbs. Of course I can remove it ans replace with HTML/PHP widget and put this Yoast code, but it doesn`t look like properly. And unfortunately if I use build-in breadcrumb widget it doesn`t work with Google Structured Data Testing Tool
Mediatama
Yups this is what i looking for, a breadcrumbs plugin by yoast.
You describe it smoothly and easy to understand.
Gonna try it right now, and keep up the good article, Tom!
Lembah Ilmu
wow, i like your article, thanks for your information
Febriyan
Thank you so much for the article. I had follow the steps and it worked only for several post. Can you help me on this? Not every posts had the breadcrumbs on my blog.
Febriyan
Never mind Tom, It is showing now. Thank you very much for the article.
Shoaib Akram
Hey !
your articles are very helpful for every blogger specially for the newbies like me.
I am almost becoming regular reader of your site.
You are an Inspiration to me. Thanks for this useful guide!
Dave LeBlanc
Thanks for this article, Tom. It helped me locate the proper php file to place Yoast’s breadcrumb code.
What The File is neat little plugin.
Tui
How do I hide it from appearing on the page?
kksilvery
Your post has helped me. I dint know anything about breadcrumbs untill i read your article, Im not a programmer, My question is what to file is saying to post it in Home.php after placing it Its not woking. Then again i visited my site and plugin says to apply it on single.php, How to customize it? This is my blog http://alltechmess.com
Allen
I am agreed with you the breadcrumbs improve the results of SEO and it is used by many of the top website to get their rank maintained in different search engines.
savvas kevrekidis
Very nice article. I knew not very much about breadcrumbs and how important are. Now i will go back and setup breadcrumbs in Yoast. Yoast is a great plugin!
bazi
Hi
I do it and it work correctly as good
thank you
itstrumblr
Thanks for telling the file is single.php…
yoast offical site doesnt tell that….but still not working..what could be the reason?
Rental Mobil Jogja
I have applied in my site http://www.sewamobiljogja.info but stil not work, I use twentyten template..does anyone knows to customize in that template
Bruce
Great article. Just an added note, I got mine working with the 2014 theme by inserting in the single.php page after the div id tag as follows:
get_header(); ?>
<?php if ( function_exists('yoast_breadcrumb') ) {
yoast_breadcrumb('’,”);
} ?>
Showed up perfectly.
Bruce
Well, that didn’t work (inserting the code) – let me try again:
get_header(); ?>
<?php if ( function_exists('yoast_breadcrumb') ) {
yoast_breadcrumb('’,”);
} ?>
Tom Ewer
Thanks for sharing Bruce!
Hamed
Cheers mate, I only read the first two paragraphs and thats all I needed lol Legend.
Tom Ewer
You’re welcome, Hamed!
Natural Nusantara
Wich best SEO Ultimate or SEO by Yoast?
brigitte
Hi, I have installed the What the File plugin, but it doesn’t show up in my toolbar. I am using a child theme with the twenty fourteen theme. Could you help me out?
Thanks,
Brigitte
Tom Ewer
Hi Brigitte,
I’d recommend that you contact the plugin developer and see if he can troubleshoot the issue for you.
Cheers,
Tom
Adhitya
Hey, this is very helpful. I’m a newbie of wordpress. Thanks for this great breadcrumb stuff.
Tom
You’re very welcome Adhitya!
Supratim
Hello admin,
Its a very informative post but I have a problem that is when I add the code in the php file, it is not coming correctly with the posts like its not alligned properly or in the place where I want to be, can you help me by visiting my site, “GameSmart”.
You can visit the site by clicking on my name and suggest me what to do, thanks 🙂
Tom Ewer
I’m afraid I can’t see what you’re talking about Supratim…
shekhar
Installed Breadcrumbs by yoast Working on my website quit easily.
But, not working in webmasters structured data test tool.
What can I do ?
Tom Ewer
No idea I’m afraid; very hard to say with such limited information!
meena
Installed but the breadcrumbs are coming up center. Any way to align left, as it is in your snapshot example?
Thanks, Meena
Aamir Lehri
Thanks for the tutorial really helpful
Tom Ewer
My pleasure Aamir!
Chwilowek
Hi,
Thanks for explaining this, however I have a problem with implementation this into my theme where there is ready widget for breadcrumbs. Of course I can remove it ans replace with HTML/PHP widget and put this Yoast code, but it doesn`t look like properly. And unfortunately if I use build-in breadcrumb widget it doesn`t work with Google Structured Data Testing Tool.. Does anyone know how can I solve this?
Many thanks in advance
raj kapil
a beautiful article about the use of breadcrumbs in seo(search engine optimization) . Breadcrumbs describe the business more precisely and also the visitors are being able to navigate the site easily.
Tom Ewer
Thanks Raj 🙂
raymond
I have been trying to past code into all parts of WordPress with no luck of breadcrumbs showing up. Can someone help me with what file to than placing it in other than saying the theme?
Kanika Sharma
You’d want to use an if statement to set the code to activate on certain page types only. Unfortunately I’m not technically savvy enough to write it out for you 😉
I’m sure someone on the WP.org forums would be able to figure this out for you pretty quickly.
Reginald
Hi there.
Thanks for the Yoast guide. I have aquestion. What happens if I do not place the code? It won’t show up?
My concern is to actually let it show on search engines. Do I need to ‘activate’ the codes by pasting it on the related pages?
Thank you.
J Sullivan
Awesome post. Been trying to figure this yoast breadcrumbs plugin out for a couple of hours. IMO any plug in that requires PHP and or FTP changes is not for beginners. I am a commercial hydronic heating expert with a decent WP busienss- blog site, (no actual computer skills) so I’m not comfortable with this one.
“In order to activate breadcrumbs you need to insert a small piece of code into the right PHP file within your theme directory. Don’t worry — this isn’t as scary as it sounds.” It sounds plenty scary when you have never messed with php files, code or ftp stuff. Thanks to this post now I know this plugin is not something I should be messing with. thank you author.
Mike Dreaneen
Excellent blog. Question – how can I get the breadcrumbs to display where I want them on a given page. At the moment they are on the top left of my product page, but would like them where woocommerce would normally display them. Also it only displays the product page title as in:
blank|blank|blank|blank|Agnes Grey although the “blanks are clickable to the correct page
Chander Sharma
Hi,
Thanks a lot for posting this article. I was searching for this only. Implemented on website !!! Great work 🙂
Wordpress Breadcrumbs
Personally, I like breadcrumbs at the footer of a site as seen on the Apple website. It depends how your main navigation is setup, of course, but it still gets you the SEO goodness whilst providing users with somewhere to go once they reach the bottom of a page.
Rahil
Nice article, but author himself is not using breadcrumbs on this blog! Did u know why? Well, breadcrumbs are good for mig merchant & online stores but for blogs it can cause huge decline in your SERP rankings. As a blogger we all know how important is our post URL and how we naturally put in important keyphrases that we target. Breadcrumbs makes it redundant. Your Post URL is not shown in search engine results rather ur category and subcategory is shown and even if it contains your keyword it is not highlighted.
Breadcrumbs are wonderful for onsite navigation, but the price you pay for the loss in SERP rankings makes it harmful for bloggers. The choice is urs! ever wondered why mashable, problogger and even this blog decided not to use breadcrumbs!
Ed
Is there a way to add it to the themes functions.php file so that core code doesn’t need to be modified on every page (assuming there are multiple pages the code needs to go into)? This would be a pain for every theme update but is manageable within functions.php file one time.
Boris Dzhingarov
Hello,
I use WordPress SEO by Yoast and I disabled all my categories, tags, arhives and database archives. Well I know I need to configure pagination and Breadcrumbs when the other are disabled. Thasnk for the article it worked for me . I added the code and now I have Breadcrumbs at every blog I manage. I was wondering if i configured it properly. Could you please check and confirm that.
Thank you Tom!
Hamza Afridi
Thank you so much, I got this working now!
Indonesia beautyful
okay thanks all of the tutorial is a good solution for me, immediately I practice in my website
Tino
I was totally lost not knowing and not finding the correct file to add the code.
As ease as pie when I read your post
Thanks so much.
Nelieta
Thank you for the information. I have the Yoast Plugin installed but I didn`t activate Breadcrumbs because I didn`t know how it works or the benefits. A great tutorial.
Netflora - Charlie
Thanks for this, wish there was a way to implement breadcrumbs without having to add code to the theme templates manually.
Still, I shall give it a go.
george quinones
Thanks for explanation.
I tough i was going crazy, but you have to customize the theme ???
Tom Ewer
Yep — you have to include the code as it instructs.
PPC Training
Thanks, this was very helpful. Got it right on the first try!
Tom Ewer
Pleasure 🙂
Barbara Partegas Rof
Ok. Good tutorial. And anyone knows how to disable them from a specific page, like the homepage for instance?
Tom Ewer
You’d want to use an if statement to set the code to activate on certain page types only. Unfortunately I’m not technically savvy enough to write it out for you 😉
I’m sure someone on the WP.org forums would be able to figure this out for you pretty quickly.
Madhukar
<?php if(!is_front_page()){
<?php if ( function_exists('yoast_breadcrumb') ) {
yoast_breadcrumb('’,”);
} ?>
}?>
Madhukar
Replace this code if u don’t want o display in home page
It should works
niki
You placed code in a post body,, Because you flagged as XML @&, etc. copy the code into theme like single.php file
Madhukar
Mathew Porter
Thanks for this, I think that I didnt set it up correctly when i had a brief look previously.
Tom Jamieson
Thanks, this was very helpful. Got it right on the first try!
hebergement web bas prix
Listening first time about the Breadcrumbs, never heard about this but by reading this blog, have understood that how an useful asset it is. The blog carries a very useful information on the topic of Breadcrumbs. Through this many folks would really understand that, how to enable the Breadcrumbs in their word press.