Plugins Plugin hub Backup SEO Caching Security Forms WooCommerce Images Best backup plugins
Hosting Hosting directory Shared hosting Managed WordPress Cloud hosting VPS hosting By reader location Hosting finder
Themes & builders Compare Rank Math vs Yoast
Tools All tools Hosting finder Plugin stack builder Cost calculator Salt generator Theme detector Who is hosting this? Speed test Headline analyzer robots.txt generator Redirect generator Uptime calculator Blog name generator
Blog Best backup plugins Deals
Guides All guides Speed up WordPress Choose hosting Back up WordPress
How we test

Setup & site building · Guide

How to Add Breadcrumbs in WordPress

How to Add Breadcrumbs in WordPress

Short answer

Add breadcrumbs in WordPress with Yoast SEO: place the Yoast SEO breadcrumbs block on a page, or paste Yoast's breadcrumb code into your child theme and switch breadcrumbs on under Yoast SEO, then Settings, then Advanced, then Breadcrumbs. Yoast also adds the BreadcrumbList structured data that search engines read.

Key takeaways

  • WordPress has no built-in breadcrumbs; Yoast SEO and Breadcrumb NavXT are the common ways to add them.
  • Yoast's breadcrumbs block, added in Yoast SEO 15.8, places a trail on a single post or page with no code.
  • Yoast's theme code goes in single.php, page.php or header.php, never in functions.php.
  • A BreadcrumbList needs at least two ListItem entries, each with a position, a name and a URL.
  • Breadcrumb NavXT has 800,000+ active installs and a 4.6 out of 5 rating on WordPress.org.

What are breadcrumbs in WordPress?

A breadcrumb is a small text path at the top of a page that shows where the page sits in the site, such as Home > Blog > Category > Post.

Each part of the path is a link, so a visitor can jump back up one level at a time instead of using the back button. Yoast's breadcrumbs help page gives the example of Home > SEO blog > Technical SEO > SEO basics, where every step is clickable back to the home page.

WordPress has no built-in breadcrumb feature, so you add them with a plugin or with code in your theme. The most common routes are Yoast SEO, which has breadcrumbs built in, and the dedicated Breadcrumb NavXT plugin.

How do you add breadcrumbs with the Yoast SEO block?

Add the Yoast SEO breadcrumbs block to the post or page, and the trail appears with no code to write.

Open the post or page in the editor, click the add block button, and search for the Yoast SEO breadcrumbs block. You can also type /yoast breadcrumbs in an empty paragraph. Yoast added this block in Yoast SEO 15.8 so breadcrumbs could be placed without touching theme files, as announced on Yoast.

The block suits a page or post where you want breadcrumbs in one place only. It does not add breadcrumbs to the rest of the site, so it is a poor pick if you want the same trail on every page.

If your theme already supports Yoast breadcrumbs, you may only need to switch them on in the plugin settings, as covered below. Check that first before adding blocks one page at a time.

How do you add breadcrumbs with the Yoast code snippet?

Paste Yoast's breadcrumb code into your child theme template where the trail should appear, then switch breadcrumbs on in the plugin settings.

Yoast's code is:

<?php
if ( function_exists('yoast_breadcrumb') ) {
  yoast_breadcrumb( '<p id="breadcrumbs">','</p>' );
}
?>

Put it in single.php for posts, page.php for pages, or at the end of header.php to show it across the whole site, as explained on Yoast. Yoast warns against adding it to functions.php, since that can cause problems.

Add the code to a child theme, not the parent theme, so a theme update does not wipe it out. The guide to what a child theme is explains how a child theme keeps your changes through parent updates.

The function_exists check means the code does nothing if Yoast SEO is turned off, so the page does not break. After the code is in place, enable breadcrumbs in Yoast's settings as described in the next section.

How do you turn on breadcrumbs in Yoast SEO settings?

Go to Yoast SEO, then Settings, then Advanced, then Breadcrumbs, and switch the Breadcrumbs setting on.

Yoast's breadcrumbs help page lists the path as Dashboard, then Yoast SEO, then Settings, then Advanced, then Breadcrumbs. If your theme supports Yoast breadcrumbs, the toggle is already there. If it does not, add the code from the previous section first.

Once breadcrumbs are on, the rest of the settings appear. You can pick the separator between the links, set what the home page is called in the trail, and set an anchor text that shows before the home link.

You can also choose which taxonomy shows in the trail for each post type. For posts, picking categories gives a trail such as Home > Category name > Post name. A different taxonomy can be set for each content type your site uses.

How do you add breadcrumbs with Breadcrumb NavXT?

Install Breadcrumb NavXT, set its options under Settings, then Breadcrumb NavXT, and add its widget or code where the trail should appear.

Breadcrumb NavXT is a dedicated breadcrumb plugin with 800,000+ active installs and a 4.6 out of 5 rating on WordPress.org, as listed on its WordPress.org plugin page. It suits sites that want more control over the trail than Yoast's settings offer.

After activation, open Settings, then Breadcrumb NavXT, to set the separator, the home link text and the templates for each part of the trail. The plugin adds a widget you can place in a widget area, plus a function you can add to a theme template.

Pick one breadcrumb tool and stick with it. Running Yoast breadcrumbs and Breadcrumb NavXT together can print two trails on the same page, which looks broken and confuses visitors.

How do breadcrumbs help search engines?

Breadcrumbs give Google a clear path for the page, and Yoast adds the matching BreadcrumbList structured data in JSON-LD automatically.

Schema.org defines a BreadcrumbList as an item list made of a chain of linked web pages, usually described by their URL and name, and usually ending with the current page. Google reads that markup to sort the page in search results.

Google's breadcrumb documentation says a BreadcrumbList must hold at least two ListItem entries, each with a position, a name and a URL. The last item may leave the URL out, and Google then uses the page's own URL.

Yoast states that it adds the needed BreadcrumbList structured data by itself, so you only need to switch the feature on. Google also says the breadcrumb feature is available on desktop in all regions and languages where Google Search is available.

BreadcrumbList ruleWhat Google needs
Minimum itemsAt least two ListItem entries
Each itemA position, a name and a URL
Last itemURL may be left out; Google uses the page URL
FormatJSON-LD added by Yoast automatically

How do you check that your breadcrumbs work?

Open a post, look for the trail near the top of the page, click each link, and run the URL through Google's Rich Results Test.

Each link in the trail should open the page it names. The home link should open the home page, the category link should open the category archive, and the final item should be the page itself, usually shown as plain text rather than a link.

Google's breadcrumb documentation advises validating the code with the Rich Results Test and fixing any critical errors before you deploy the change widely. Test a few pages first, then check the rest after the feature is live.

If the trail is missing on a page, check that breadcrumbs are switched on in Yoast, that the code or block is on that page type, and that no second breadcrumb tool is hiding it. The guide to setting up Yoast SEO covers the plugin's main settings in one place.

How do you style breadcrumbs?

Style the breadcrumb trail with CSS, targeting the wrapper your tool outputs, such as the paragraph with the id “breadcrumbs” from Yoast's code.

Yoast's settings control the text of the trail, such as the separator and the home page name, but not its colors or spacing. Those come from your theme or from custom CSS you add yourself.

Keep the styling quiet: small text, a muted color, and a separator such as a chevron or slash. Breadcrumbs are a wayfinding aid, so they should sit near the top of the page and stay out of the way of the title.

If your theme already styles breadcrumbs, leave it alone. Adding a second set of rules can make the trail look different on different page types, which is worse than the theme default.

How do you remove breadcrumbs from WordPress?

Switch breadcrumbs off in your plugin's settings, or remove the breadcrumb block or code from the theme.

In Yoast, go to Yoast SEO, then Settings, then Advanced, then Breadcrumbs, and switch the setting off. If you added the breadcrumb block to individual pages, delete the block from each page too.

For Breadcrumb NavXT, remove the widget from the widget area or delete the template code, then deactivate the plugin if nothing else uses it. The guide to removing unused plugins and themes safely covers the clean-up steps.

Note that Yoast has output breadcrumb structured data by default since version 15.8, even when the visible breadcrumb feature is off, as stated on Yoast. Turning the display off does not remove that markup from the page source.

What mistakes should you avoid?

Do not run two breadcrumb tools at once, do not paste the code into the parent theme, and do not build the trail from the URL alone.

A trail built from the URL can mislead visitors when a page lives in more than one section. Google's breadcrumb documentation advises that the trail reflect a typical user path rather than the URL folder structure.

Other mistakes to avoid:

  • Adding the Yoast code to functions.php, which Yoast warns against.
  • Editing the parent theme's files, so the next theme update deletes your code.
  • Using a separator that looks like a link, such as an underlined slash.
  • Leaving breadcrumbs off category and tag archives, where visitors need them most.

Check the trail on posts, pages, category archives and the home page before you call the job done. A breadcrumb that works on posts but is missing on archives is only half finished, and the guide to the best permalink structure for SEO pairs with this one when you plan your site's paths.

Frequently asked questions

Can I add breadcrumbs without touching code?

Yes, if your theme supports them or if you use the Yoast SEO breadcrumbs block. The block needs no code. The theme-wide route needs a small code snippet in a child theme template, then the breadcrumbs switch turned on in Yoast SEO settings.

What is Breadcrumb NavXT?

Breadcrumb NavXT is a dedicated breadcrumb plugin with 800,000+ active installs on WordPress.org. It gives finer control over the trail's templates and separators than Yoast's settings. Use one breadcrumb tool only, not both at once.

Do breadcrumbs help my site show up in Google?

Yes, when the markup is valid. Yoast adds BreadcrumbList structured data in JSON-LD automatically. Google's breadcrumb documentation says a BreadcrumbList needs at least two ListItem entries, each with a position, a name and a URL.

How do I check that my breadcrumbs are working?

Open a post and look for the trail near the top of the page. Click each link to check it opens the page it names. Then run the page URL through Google's Rich Results Test to check the breadcrumb structured data.

How do I remove breadcrumbs from my site?

In Yoast, go to Yoast SEO, then Settings, then Advanced, then Breadcrumbs, and switch the setting off. If you used the block, delete it from the pages where you added it. If you used code, remove it from the child theme template.

Sources

  1. Yoast SEO settings: Breadcrumbs Yoast
  2. What are breadcrumbs? Why are they important for SEO? Yoast
  3. Breadcrumb (BreadcrumbList) structured data Google Search Central
  4. BreadcrumbList Schema.org
  5. Breadcrumb NavXT WordPress.org

Is your product missing, or something out of date?

Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.

About the editors

Written and checked byWPLegible Editorial Team Independent WordPress reviews and guides

Researched from the primary sources listed above and checked against our editorial rules before publishing.