GeneratePress ships without breadcrumbs, so you add them from a plugin that generates the markup and then place that markup with a theme hook. There are two ways to do the placing: the Hooks Element, if you have GP Premium, or four lines of PHP in a site-specific plugin if you do not. Both use the same breadcrumb source, so the choice is only about where the code lives.
The examples below use Yoast SEO, because its breadcrumb function is the one most GeneratePress sites already have available. Rank Math and dedicated breadcrumb plugins expose an equivalent function or shortcode, so the placement step is unchanged — only the function name differs.
Why breadcrumbs are worth adding
BreadcrumbList structured data, which is what Google uses to render a breadcrumb trail in place of a bare URL in the result. Neither reason helps if your category structure is a mess — breadcrumbs expose your site structure rather than improve it.Step 1: enable breadcrumbs in Yoast SEO
Yoast’s breadcrumb feature is off by default and has to be switched on before any placement code will output anything. In current Yoast releases it lives under Yoast SEO → Settings → Advanced → Breadcrumbs; older versions put it under SEO → Search Appearance → Breadcrumbs. Turn on “Enable breadcrumbs” and save.
While you are on that screen, set the separator and the “Anchor text for the homepage” value. The defaults are fine, but the taxonomy setting underneath them is the one worth thinking about: it decides which taxonomy a post’s trail is built from, and it only produces a sensible trail if each post has exactly one obvious category.

Step 2a: place them with the GP Premium Hooks Element
If you have GP Premium, use this method. It keeps the change in the database where another person on the site can find and edit it, and it gives you display rules without writing conditionals.
- Go to Appearance → Elements, click Add New and choose Hook.
- In the content area, add Yoast’s shortcode:
Home / - In the Hook dropdown, pick where it should render.
before_entry_titleis the usual choice for posts;generate_after_headerputs it above the content area instead. - Tick Execute Shortcodes. Without this the shortcode prints as literal text.
- On the Display Rules tab, set Location to Post, or to whichever post types and archives should show the trail.
Publish the element and load a post. GeneratePress’s hooks visual guide shows exactly where each hook fires if before_entry_title is not where you want it.
Step 2b: place them with a filter, without GP Premium
Do not use Appearance → Theme Editor for this
functions.php means the next GeneratePress update overwrites your change, and a syntax error typed into the Theme Editor takes the whole site down with no undo. Put this in a child theme or — simpler — in a small site-specific plugin, which keeps working even if you switch themes later. If you have already locked yourself out this way, disabling a plugin without dashboard access covers getting back in over FTP.Create wp-content/plugins/gp-breadcrumbs/gp-breadcrumbs.php with this, then activate it from the Plugins screen:
<?php
/**
* Plugin Name: GP Breadcrumbs
* Description: Outputs Yoast SEO breadcrumbs in GeneratePress.
*/
add_action(
'generate_after_header',
function () {
// Bail quietly if Yoast is deactivated, rather than fataling.
if ( ! function_exists( 'yoast_breadcrumb' ) ) {
return;
}
// Skip the front page, where a trail says nothing useful.
if ( is_front_page() ) {
return;
}
yoast_breadcrumb(
'<div class="grid-container grid-parent"><p id="breadcrumbs">',
'</p></div>'
);
}
);
The function_exists() check is the part people leave out and then regret: without it, deactivating Yoast for ten minutes of plugin-conflict testing produces a fatal error on every page. Swap generate_after_header for any other GeneratePress hook to move the output, and keep the grid-container wrapper so the trail lines up with the content width rather than running to the edge of the viewport.
If the breadcrumbs do not appear
That last one is worth taking seriously, because it is a symptom rather than a glitch. Breadcrumbs only produce a clean trail on a site with a clean taxonomy: one category per post, and tags used as a controlled vocabulary rather than a keyword dump. If enabling breadcrumbs has just shown you how tangled your categories and tags really are, WordPress tag archives: noindex, delete, or keep? covers auditing the terms you have and deciding what to cut.
None of this transfers if you move to a block theme, which is worth knowing before you invest in hooks. Block themes have no generate_after_header and no Hooks Element: you place a breadcrumb block inside a template or a template part in the Site Editor instead, and the decision becomes which container it belongs in. Synced patterns vs template parts covers that choice, and how to choose a WordPress theme is worth a look if you are weighing GeneratePress against a block theme in the first place.

Leave a Reply to This Post