Breadcrumbs
Show a breadcrumb trail with the [speedrank_breadcrumbs] shortcode or a PHP template tag, and get matching BreadcrumbList schema on every page.
On this page
Breadcrumbs show visitors where a page sits in your site, for example Home › Blog › Recipes › Lemon tart. Google uses the same trail in search results instead of the bare URL.
RankKit SEO does two things with breadcrumbs. It always adds BreadcrumbList schema to the page's JSON-LD (as part of the automatic schema), and it gives you a shortcode and a PHP function to show the trail on the page. Showing it is up to you: many themes have their own breadcrumbs, and you only want one visible trail.
How the trail is built
| Page | Trail |
|---|---|
| Post | Home › blog page (if you set one under Settings → Reading) › parent categories › primary category › post |
| Page | Home › parent pages › page |
| Custom post type item | Home › post type archive (if it has one) › parent items › item |
| Category, tag or term archive | Home › parent terms › term |
| Post type archive | Home › archive |
| Author archive | Home › author name |
| Search results | Home › Search: your query |
| 404 | Home › Page not found |
The last item is the current page and is not a link. On the home page there is no trail, so nothing is shown.
Primary category. For posts in several categories, the trail uses the post's primary category: the one imported from your previous SEO plugin, or set by an AI agent with the set_primary_term tool. Without one, it uses the post's first category.
Show breadcrumbs with the shortcode
Add this where you want the trail:
[speedrank_breadcrumbs]
- Block themes: open Appearance → Editor, edit the single post template (and any others you want), and add a Shortcode block containing
[speedrank_breadcrumbs]above the post title. - Widgets or page content: paste the shortcode into a Shortcode block or a text widget.
There is no RankKit SEO breadcrumbs block. The Shortcode block is the way to place them in block themes.
Show breadcrumbs with PHP
In a classic theme, add the template tag to your theme files (for example single.php or header.php). Use a child theme so updates don't overwrite it:
<?php if ( function_exists( 'speedrank_breadcrumbs' ) ) { speedrank_breadcrumbs(); } ?>
speedrank_breadcrumbs( $echo = true ) prints the trail. Pass false to get the HTML back as a string instead:
<?php
$trail = function_exists( 'speedrank_breadcrumbs' ) ? speedrank_breadcrumbs( false ) : '';
?>
The HTML output
<nav class="speedrank-breadcrumbs" aria-label="Breadcrumb">
<a href="https://example.com/">Home</a> <span class="sep" aria-hidden="true">›</span>
<a href="https://example.com/recipes/">Recipes</a> <span class="sep" aria-hidden="true">›</span>
<span aria-current="page">Lemon tart</span>
</nav>
RankKit SEO adds no CSS for breadcrumbs, so they take your theme's text and link styles. To style them, target .speedrank-breadcrumbs and .speedrank-breadcrumbs .sep in your theme or in Appearance → Customize → Additional CSS:
.speedrank-breadcrumbs { font-size: 0.875rem; margin-bottom: 1rem; }
.speedrank-breadcrumbs .sep { margin: 0 0.35em; opacity: 0.6; }
Settings
Breadcrumbs have no settings screen. The feature is a module that is on by default and has no switch on the Dashboard.
- The shortcode works only while the breadcrumbs module is on. An AI agent can switch it with the
set_moduletool. - The
BreadcrumbListschema is part of the schema output, so it follows the Schema module on RankKit SEO → Dashboard → Modules. - Developers can change the trail with the
speedrank_breadcrumbsfilter. See Hooks and filters.
FAQ
My theme already shows breadcrumbs. Do I need RankKit SEO's?
No. You still get RankKit SEO's BreadcrumbList schema either way. Just make sure only one trail is visible on the page.
Why does a post show the wrong category in the trail?
The post has no primary category, so the trail uses its first category. Set a primary category (for example by asking an AI agent connected over MCP), or keep each post in one category.
Does the visible trail have to match the schema?
It does, and with RankKit SEO it always will: the shortcode, the PHP function and the schema are built from the same trail.
Was this page helpful?
Related guides
How RankKit SEO's schema works
RankKit SEO builds one connected JSON-LD graph for every page automatically. Learn which nodes it outputs, where they come from and how to change them.
Shortcodes and template tags
Add RankKit SEO breadcrumbs, business details and store lists to posts and theme templates with shortcodes and the speedrank_breadcrumbs() template tag.
Hooks and filters
Every public RankKit SEO action and filter, with its parameters and what it changes, plus PHP examples for head tags, schema, llms.txt and agent tools.
Still need help?
Email us with your WordPress and RankKit SEO versions and what you tried. Pro customers get priority replies.