Breadcrumbs

Show a breadcrumb trail with a shortcode, a block or a template function. It's the same trail as the BreadcrumbList structured data search engines read.

Free
  • Home › Products › Shirts › Linen Shirt

Adding breadcrumbs

In the block or site editor, add the Siteryn Breadcrumbs block (Theme category), usually to your single post or product template. Option: Separator (default ›).

[siteryn_breadcrumbs]
[siteryn_breadcrumbs separator="/" home="Start"]

separator: the character between items (default ›, empty for none). home: a different label for the first item.

<?php
if ( function_exists( 'siteryn_seo_geo_aeo_breadcrumbs' ) ) {
	siteryn_seo_geo_aeo_breadcrumbs( array( 'separator' => '›' ) );
}
// Return instead of print: array( 'echo' => false )

How the trail is built

PageTrail
PostHome › Blog (your posts page, if set) › Category › its parents › Post
PageHome › Parent pages › Page
Custom content / productHome › Archive (e.g. Products) › Term or parent pages › Item
Category or term archiveHome › Archive › Parent terms › Term
Author, date, searchHome › Author name / date / Search results for "…"

The term is taken from the first hierarchical taxonomy of the content type. Breadcrumbs aren't shown on the front page or when the trail has a single item.

The first hierarchical taxonomy can be Brands rather than Categories, so a product's trail may show its brand. A developer can choose the term with the siteryn_seo_geo_aeo_breadcrumbs filter (see Developer guide).

Markup & styling

<nav class="siteryn-breadcrumbs" aria-label="Breadcrumb">
  <ol class="siteryn-breadcrumbs__list">
    <li class="siteryn-breadcrumbs__item"><a href="/">Home</a><span class="siteryn-breadcrumbs__sep" aria-hidden="true">›</span></li>
    <li class="siteryn-breadcrumbs__item"><span aria-current="page">Current page</span></li>
  </ol>
</nav>

A tiny stylesheet lays the items out in a row. Style it from your theme with the classes above.

Structured data

The same trail is output as BreadcrumbList structured data on every page with 2+ items (when structured data is on), whether or not you display the breadcrumbs. The home label changes only the visible text.