Home › Services › Roof Repair › Flat Roofs. That little trail at the top of a page is a breadcrumb. It tells a visitor where they are and lets them step back up a level with one tap, which is handy on a site with more than a couple of layers of pages.
WordPress does not show breadcrumbs on its own, so the trail comes from your SEO plugin, your theme, or WooCommerce. Below are the steps to add breadcrumbs in WordPress with Rank Math or Yoast SEO and to place the trail in block and classic themes. When the trail shows the wrong path, the cause is almost always the way the pages are organised, and that gets its own section.
Does your site benefit from breadcrumbs?
Breadcrumbs help when pages sit inside other pages or categories:
- a services section with several service pages and sub-pages;
- a blog with categories that readers browse;
- a shop with product categories;
- a resources or locations section several levels deep.
A five-page site with everything one click from the home page gains little. The trail would read “Home › Contact”, which tells nobody anything new. If you are unsure whether this is worth doing at all, the group guide on choosing how to add a feature to WordPress sets out the questions to ask first.
Check what you already have
Before installing or enabling anything, look at what is already there. Doing this first avoids ending up with two trails on the same page.
- Your theme. Several popular themes have a breadcrumb option in Appearance → Customize, often under header, page title or layout settings. Some can display the trail built by your SEO plugin instead of their own.
- Your SEO plugin. Rank Math and Yoast SEO both include breadcrumbs. The feature may be switched off, or switched on but not placed anywhere on the page.
- WooCommerce. If you run a store, WooCommerce has its own breadcrumbs for shop and product pages, and many themes show them automatically.
- The block inserter. In the block editor or Site Editor, search for “breadcrumb”. Whatever appears tells you which tools on your site can provide one.
How to add breadcrumbs in WordPress with Rank Math
- Go to Rank Math’s General Settings and open the Breadcrumbs section. If you do not see it, check that the plugin is in its advanced mode, which shows more settings.
- Turn on the breadcrumbs option.
- Set the separator, the label for the home link, and whether to show the category in a post’s trail.
- Save the settings.
- Place the trail on the site, using one of the methods in “Placing the trail” below. Rank Math provides a shortcode, , which works in a Shortcode block.
Adding breadcrumbs with Yoast SEO
- Open Yoast SEO’s settings and find the Breadcrumbs section (in recent versions it sits under the advanced settings).
- Set the separator and the home label, and choose which taxonomy to use for posts, usually categories.
- Save.
- Place the trail. Yoast provides a breadcrumbs block in the block editor, and a shortcode, , for places a block cannot go. Some themes pick up Yoast’s breadcrumbs automatically once the feature is on.
Use one plugin’s breadcrumbs, not both. If you are moving from one SEO plugin to the other, remove the old shortcode or block from your templates as part of the switch.
Placing the trail on your pages
Block themes
In a block theme you place the trail once in a template, and it appears on every page using that template.
- Go to Appearance → Editor and open Templates.
- Choose the template you want, such as Pages or Single Posts.
- Add the breadcrumb block, or a Shortcode block containing your plugin’s shortcode, just above the page title.
- Save, then check a few pages at different depths.
Repeat for each template that needs the trail. Templates for archives and search results usually do not.
Classic themes
If the theme has a breadcrumb setting in the Customizer that can use your SEO plugin’s trail, use that. It is the cleanest route.
If it does not, the usual method is to add a line of PHP from the plugin’s documentation to a theme template file. Do not edit the parent theme directly, because the next theme update will erase your change. That work belongs in a child theme, explained in our post on whether you need a child theme. If editing template files is not something you want to try, a shortcode in a widget area near the top of the content is a simpler compromise, where the theme provides one.
Why the trail shows the wrong path
Breadcrumbs reflect how your content is organised. When the trail looks wrong, the structure usually is.
- Pages without a parent. For pages, the trail follows the Parent setting in the page’s sidebar. If “Flat Roofs” has no parent set, it will appear directly under Home. Set the parent and the trail updates. Changing a parent usually changes the page’s address too, so redirect the old one.
- Posts in several categories. A post in three categories can only show one in its trail. Both plugins let you choose a primary category for each post; set it.
- “Uncategorized” in the trail. The post has no real category. Rename the default category, or assign proper ones. Our post on how categories and tags differ covers a sensible structure.
- A long, ugly page title. The trail uses the page title by default. Both plugins let you set a shorter breadcrumb title for a page, usually in the advanced part of that page’s SEO settings.
- Two trails on one page. The theme and the plugin are both showing one. Switch one off.
When you create new pages under a section, setting the parent at that moment keeps everything tidy, as the post on adding a new page in WordPress suggests.
Breadcrumb schema, in general terms
Alongside the visible trail, SEO plugins usually add BreadcrumbList structured data to the page’s code. This describes the same path in a form search engines can read. Google has used breadcrumb markup to understand where a page sits in a site, and has shown breadcrumb-style paths in its results in various forms over the years. How results are displayed changes, and no plugin setting can promise any particular appearance.
Two practical points. Keep the visible trail and the structured data consistent, which happens naturally when the same plugin produces both. And if you want to check what is being output, paste a page’s address into Google’s Rich Results Test. Our post on adding schema markup in WordPress explains that test and the other types of markup your plugin adds.
Page parents, categories and a tidy trail are all part of the site structure covered in our beginner’s guide to running WordPress.
Frequently asked questions
Should the home page show breadcrumbs?
No. The home page is the top of the trail, so a breadcrumb there would only say “Home”. Most plugins and themes leave it off automatically. If yours appears on the home page, switch it off in the theme setting, or remove the block from the template the home page uses.
Can I change the separator or the word “Home”?
Yes. Both Rank Math and Yoast SEO let you choose the separator character and the label of the first link in their breadcrumb settings. Some owners use the business name instead of “Home”. Keep it short, because on a phone a long trail wraps onto several lines.
Do breadcrumbs need styling to look right?
Often a little. The plugin outputs plain links, and the theme decides how they look. If the trail looks cramped or too large, a few lines of additional CSS can adjust the font size and spacing. Keep the links clearly clickable and the current page visibly different from the links above it.
Will adding breadcrumbs change my page URLs?
No. Breadcrumbs only display a path; they do not change any address. URLs change if you alter a page’s parent or slug, or your permalink settings. If you reorganise pages to make the trail more logical, check each page’s address afterwards and add redirects for any that moved.
A tidy trail, not a big project
On a block theme, everything here is done through settings and templates, with no code. Classic themes are the exception when they have no breadcrumb option, because the trail then has to go into a template file in a child theme. If you would rather not touch theme files, that edit is part of our theme customisation work.
Next in this series: How to Add Business Hours to WordPress and Keep Them Right