4th May, 2018 | Blog |

What Are Breadcrumbs And How To Add Them To WordPress

Using Wordpress? Get our lightening fast Wordpress Optimised Hosting.

Get Wordpress Hosting
Breadcrumbs are an essential navigation element for any website with multiple levels of organization. They allow your visitors to trace their path from the page they’re currently on back to the homepage of your site through all the levels in between—hence, the reference to breadcrumbs as a supposed means of tracing one’s way back through a dense forest.

While adding breadcrumbs to a WordPress site is a relatively simple process, getting them to show up exactly where you want can be a more difficult task. In this article, we will show you how to add breadcrumbs to anywhere on your WordPress site with just two plugins and a minimal knowledge of the WordPress file structure.

1. Install The Yoast SEO Plugin

Yoast SEO is one of the most feature-rich SEO plugins available for WordPress, and adding breadcrumbs to your WordPress site is just one of the many things that Yoast SEO can do.This plugin is essential for those who wish to optimize their website for maximum visibility, and perhaps the best of the plugin is that it’s free!

2. Enable Breadcrumbs In Yoast's Settings

Once Yoast is installed, you should have a new menu item called "SEO" within your WordPress sidebar on the left-hand side of your screen. It should be below the "Settings" option. Hover over the "SEO" option and click on "Advanced" in the sub-menu that will pop up. You’ll end up at a new screen with three tabs, the first of which says “Breadcrumbs.” Check “Enable Breadcrumbs” and edit any of the other settings that you wish to customize. Most sites will do just fine with the default settings, but some site owners, for instance, might want the breadcrumbs to always display the category taxonomy for blog posts. Once you have customized all your setting, click "Save Changes". 

3. Get Your Breadcrumbs PHP Code

Now that you've enabled breadcrumbs in Yoast SEO, you need to grab the code that will allow you to place the breadcrumbs just where we want them within your website. The PHP code for breadcrumbs is as follows:if ( function_exists( 'yoast_breadcrumb' ) ) { yoast_breadcrumb(); }

4. Choose Where You Want To Place Your Breadcrumbs

Usually, sites will display breadcrumbs in one of three places: just below the header content and before the page/post content (i.e. top banner, logo, and main navigation), right after the page/post content but before the footer, or in the footer itself. However, this part is completely up to you.

5. Place The Code In You WordPress Theme File

Open your WordPress theme folder in the WordPress backend by going to Appearance » Editor or using an FTP application. If you use FTP, your theme folder will be in wp-content/themes/[your theme name]. Next, open header.php for editing. This is where things can get a little tricky. Every theme is different, so you want to try to find a place for the breadcrumbs code that will blend nicely with the theme and not break anything. 

Once you’re done, save the file and refresh your site to see if they breadcrumbs show up where you want them.

Using Wordpress? Get our lightening fast Wordpress Optimised Hosting.

Get Wordpress Hosting