How to Add Breadcrumbs in GeneratePress Theme

In this guide, I will show you how to add breadcrumbs in GeneratePress theme. Unlike other themes, GeneratePress theme makes it easy to add the RankMath breadcrumbs and Yoast SEO breadcrumbs.

Some WordPress themes have a built-in option to display the breadcrumbs on every post. You just have to enable the option to add the breadcrumbs for every post in theme panel. However, for themes like GeneratePress, it requires few extra steps to display breadcrumbs.

GeneratePress theme is a very popular theme used by bloggers because it is built focussing on speed and performance. The theme is very light-weight and SEO friendly too. A free version of GeneratePress theme is available for download in WordPress themes site.

There are many articles on the web that describe how to optimize GeneratePress theme. Enabling GeneratePress breadcrumbs is one of the important section while optimizing the theme. If you are using GeneratePress theme and want to know how to add and display breadcrumbs, this post is for you.

Read: How to add Google Analytics in GeneratePress theme

This guide assumes that you are using either Rank Math or Yoast SEO plugin for your site. By far, RankMath and Yoast SEO are popular SEO plugins that most of the bloggers use. I will show you how to add the breadcrumbs to GeneratePress theme for both these plugins.

Can I use Plugins to Add Breadcrumbs to GeneratePress?

Yes, there are numerous WordPress plugins that help you to add breadcrumbs in GeneratePress theme. However, these plugins should be avoided as they add extra bloat and sometimes slow down your site.

If you are using a free GeneratePress theme, you can enable breadcrumbs using a plugin or create a child theme and modify functions.php. This is true with any free theme as they offer limited functionality.

One plugin that I can recommend for adding breadcrumbs to GeneratePress is Code Snippets plugin. It’s a free plugin available on WordPress plugin repository for download. You can use the Code Snippets plugin to insert a breadcrumb code in the free GeneratePress Theme.

If you are using GeneratePress Premium theme, you can use Elements Module with which you can add and display breadcrumbs. With Elements module, you can add breadcrumbs in GeneratePress theme without using any plugins.

What are Breadcrumbs?

Breadcrumbs are a text path, usually placed on top of posts, to help visitors navigate easily on the website. The Breadcrumbs also indicate where the user is on the site and how far they are from the site home page or category.

Breadcrumbs can also be placed at the end of the posts, but placing it at the top of the posts is more effective. The visitors can quickly notice the breadcrumbs when they are placed on top of the content.

You may find some websites without breadcrumbs, and that’s fine. Displaying the breadcrumbs on every post or page is optional.

The below screenshot shows an example of how the breadcrumbs looks on a single post. The theme used here is GeneratePress. During the GeneratePress theme customization, I have added a bit of CSS styling added to make breadcrumbs appear look better.

Example of Breadcrumbs in GeneratePress Theme
Example of Breadcrumbs in GeneratePress Theme

Are Breadcrumbs good for SEO?

Yes, the breadcrumbs are good for SEO. The presence of Breadcrumbs on a site are a sign of a SEO friendly website because they make navigation easier. They reduce the bounce rate of a site by encouraging the visitors to visit more pages before they leave the website.

Adding breadcrumbs in GeneratePress theme is very beneficial for SEO. Most visitors find breadcrumbs helpful, especially while they on a post and quickly want to navigate to the homepage.

Adding Breadcrumbs to GeneratePress theme

In this guide, we will look at two main topics related to adding the Breadcrumbs:

  1. Add Breadcrumbs in GeneratePress theme using RankMath Plugin
  2. Add Breadcrumbs in GeneratePress theme using Yoast SEO Plugin

Rank Math SEO is the best SEO Plugin for WordPress to increase your SEO traffic. Rank Math is a game-changing SEO plugin that will level the SEO playing field in your favor to help increase traffic.

Yoast SEO is a WordPress plugin that improves your website’s rankings on search engines, by helping you optimize your site’s content and keywords.

Since both of these SEO plugins are widely used, I am going to show you how to add breadcrumbs in GeneratePress theme for these two plugins.

Also Read: How to Remove Date and Time from GeneratePress Comments

Activate the Elements Module in GeneratePress Theme

If you are using the GeneratePress Premium theme, you must activate the Elements Module with these steps:

  • Log in to the WordPress dashboard.
  • Go to Appearance > GeneratePress.
  • On the GeneratePress Dashboard section, go to Modules and Activate the Elements Module.
Activate the Elements Module in GeneratePress Theme
Activate the Elements Module in GeneratePress Theme

Once you have enabled the Elements module, you can add the code to enable the breadcrumbs for Yoast SEO or RankMath plugins in GeneratePress.

How To Add RankMath Breadcrumbs in GeneratePress Theme

If you are using Rank Math SEO plugin, you have to first enable the breadcrumbs function in Rank Math plugin settings.

  • Go to Rank Math SEO > General Settings > Breadcrumbs.
  • Enable Breadcrumbs function.
  • Copy the Breadcrumbs code or short code provided by Rank Math and click Save Settings.
Enable RankMath Breadcrumbs
Enable RankMath Breadcrumbs

Now let’s look at the steps to add RankMath breadcrumbs in GeneratePress theme. Go to Appearance > Elements. Click Add New Element > Choose Element Type as Hook and click Create.

Add RankMath Breadcrumbs in GeneratePress Theme
Add RankMath Breadcrumbs in GeneratePress Theme

Enter the hook name, for example RankMath breadcrumbs. Use the RankMath Breadcrumbs Code as below. This shortcode is provided by Rank Math team to help website owners display breadcrumbs.

[rank_math_breadcrumb]

At the bottom, click the Settings tab and select the Hook option to generate_before_content. Since we are using the RankMath breadcrumb short code, enable Execute Shortcodes.

Add RankMath Breadcrumbs in GeneratePress Theme
Add RankMath Breadcrumbs in GeneratePress Theme

Click the Display Rules tab and here you can define where exactly you want to display the Rank Math breadcrumbs. In this example, I have selected the following location rule for displaying the rank math breadcrumbs GeneratePress.

  • Location – Post and display breadcrumbs on All Posts.
  • Exclude – Page and do not display breadcrumbs on All Pages

If you are choosing the above display rules, the Rank Math breadcrumbs will appear on all posts and will not show up on pages. You can tweak these settings based on your requirements.

Add RankMath Breadcrumbs in GeneratePress Theme
Add RankMath Breadcrumbs in GeneratePress Theme

After you make the above changes, click Publish. If you are using a caching plugin, ensure you clear the cache once. Now open your site and click any post and the Rank Math breadcrumbs will appear at the beginning of the posts or before the main content.

How To Add Yoast SEO Breadcrumbs in GeneratePress Theme

Use the following steps to add Yoast SEO breadcrumbs in GeneratePress theme. First, you need to enable the breadcrumbs in Yoast SEO plugin.

In the WordPress dashboard, go to Yoast SEO > Search Appearance > Breadcrumbs > Enable Breadcrumbs. This will enable breadcrumbs for your theme. Click Save Changes.

Enable breadcrumbs in Yoast SEO Plugin
Enable breadcrumbs in Yoast SEO Plugin

Now we will add the Yoast SEO Breadcrumbs in GeneratePress theme. Go to Appearance > Elements. Click Add New Element > Choose Element Type as Hook. Click Create.

Add Yoast Breadcrumbs in GeneratePress Theme
Add Yoast SEO Breadcrumbs in GeneratePress Theme

On Add New Hook page, enter a name for this hook such as Yoast Breadcrumbs or something similar. Use the Yoast SEO Breadcrumbs Code as below. This code is provided by Yoast team to help website owners display breadcrumbs.

<?php
if ( function_exists('yoast_breadcrumb') ) {
  yoast_breadcrumb( '<p id="breadcrumbs">','</p>' );
}
?>

Paste the Yoast SEO Breadcrumbs PHP code in the box. Now scroll-down and click Settings tab. Here you must define settings for displaying the breadcrumbs. Select the Hook as generate_before_content and check the box for Execute PHP.

Yoast SEO Add Breadcrumbs in GeneratePress Theme
Yoast SEO Add Breadcrumbs in GeneratePress Theme

Now click the Display Rules tab and set a location to display the Yoast SEO breadcrumbs. To implement Yoast SEO breadcrumbs site-wide, which is on all posts and pages, select All Singular.

Other options to display the Yoast SEO breadcrumbs in GeneratePress include the following:

  • Entire Site
  • Front Page
  • Blog
  • All Archives
  • Author Archives
  • Date Archives
  • Post
  • Page

After you finalize the settings and display rules, click Publish. This will turn the Hook element active.

Yoast SEO Add Breadcrumbs in GeneratePress Theme
Yoast SEO Add Breadcrumbs in GeneratePress Theme

To check if Yoast SEO breadcrumbs are displayed on a post, clear the cache (in case you are using a caching plugin). Now visit any post and the Yoast SEO breadcrumbs appear on top of the post as per the hook display settings.

How to Add Breadcrumbs in GeneratePress Theme - Yoast SEO
How to Add Breadcrumbs in GeneratePress Theme – Yoast SEO

Conclusion

After reading this article, I am confident that you now know how to add breadcrumbs in GeneratePress theme. It doesn’t matter what SEO plugin you’re using, every SEO plugin offers similar features.

You should see more such useful posts published in coming months. I really hope you’ve liked this post. If you require any further assistance or have suggestions, feel free to add them in the comments section below.

Leave a Comment