How to add breadcrumbs to WordPress

To add breadcrumbs to WordPress with Hydrogen SEO, switch on Enable breadcrumbs under Hydrogen SEO → Breadcrumbs, then place the [hydrogen_seo_breadcrumbs] shortcode or the hydrogen_seo_breadcrumbs() PHP function where the trail should appear. The setting alone does not add anything to your theme; the trail shows only where you place it.

Breadcrumbs are the Home › Guides › This post trail near the top of a page. They give visitors a quick way up a level, add internal links to your category pages, and, through BreadcrumbList schema, let Google show a readable path instead of a raw URL in results.

Step by step

1. Check whether your theme already has breadcrumbs

Many themes include a breadcrumb option in the Customizer or theme settings. Use one trail, not two. If the theme's trail already looks right, you can keep it: Hydrogen SEO prints BreadcrumbList schema either way. If you want the trail controlled by Hydrogen SEO's settings, turn the theme's version off first.

2. Turn on breadcrumbs in Hydrogen SEO

  1. Open Hydrogen SEO → Breadcrumbs.
  2. Switch on Enable breadcrumbs. Visible breadcrumbs are off by default.
  3. Set the Separator, and decide whether to Show home link and Show current page title. Leave Link the current page off, so the last item is plain text.
  4. Use the Breadcrumb preview to see the trail on a post, a page and a category before saving.

3. Place the trail with the shortcode

Paste the shortcode into a post, a widget, a page builder's shortcode element, or a Shortcode block in a block theme template:

code
[hydrogen_seo_breadcrumbs]

In a block theme, open Appearance → Editor, edit the Single Posts template, add a Shortcode block above the post title and save. Attributes override the settings for one placement, for example [hydrogen_seo_breadcrumbs separator="/" class="my-crumbs"].

4. Or place it in a classic theme template

In a child theme, add the function to header.php or just above the title in single.php:

php
<?php if ( function_exists( 'hydrogen_seo_breadcrumbs' ) ) { hydrogen_seo_breadcrumbs(); } ?>

The function_exists check keeps the theme working if the plugin is ever deactivated. Edit a child theme, not the parent, or the next theme update will erase the change.

5. Choose which category the trail goes through

Under Trail, switch on Show parent categories for Home › Guides › SEO Guides rather than Home › SEO Guides. Taxonomy per post type sets which taxonomy a post type's trail uses, such as a custom taxonomy for a custom post type. For a post in several categories, set its Primary category in the SEO Settings sheet. If a trail goes through the wrong category, fix the primary category rather than the site-wide settings. A long title can get a shorter Breadcrumb Title in the same sheet.

6. Keep old shortcodes from another plugin

If your content uses [rank_math_breadcrumb], [wpseo_breadcrumb] or [aioseo_breadcrumbs], they keep working after you switch: while that plugin is inactive, Hydrogen SEO answers the shortcode with its own trail. Replace them at your own pace. Tools → Import SEO Data also brings breadcrumb settings across from supported plugins.

7. Check the schema

View the source of a post and search for BreadcrumbList. It follows your schema settings, not the Enable breadcrumbs switch, so it is printed even without visible breadcrumbs. Hiding the home link or current page changes the visible trail only; the schema keeps both, as Google expects. Test the URL in the Rich Results Test, which reports breadcrumbs as a supported type.

Common mistakes

  • Two trails on the page, one from the theme and one from the shortcode.
  • Every post going through Uncategorized. Set a primary category, or give posts a real category and retire Uncategorized.
  • Trails that do not match your URLs or menus. A trail should reflect how the site is actually organized, or visitors get a path that leads nowhere they expect.
  • Placing the shortcode inside content on some posts and not others. A template placement keeps it consistent.

WooCommerce stores

Switch on Show shop page to include the shop in product and product category trails, for example Home › Shop › Clothing › Linen Shirt. Products go through their primary product category. WooCommerce themes often print their own breadcrumb, so check for a duplicate. Category structure for stores is covered in optimize WooCommerce category pages.

Common questions

Why are my breadcrumbs not showing?

Check that Enable breadcrumbs is on and that the shortcode or PHP function is actually placed in your theme or content. The setting does not insert breadcrumbs by itself.

Do breadcrumbs help SEO?

Indirectly. They add internal links up your structure and, with BreadcrumbList schema, can give you a readable path in search results. They do not raise rankings on their own.

Can I shorten a long post title in the breadcrumb only?

Yes. Set the Breadcrumb Title field in the post's SEO Settings sheet. The post title and SEO title stay unchanged.