How To Add Breadcrumbs In GeneratePress Theme

Are you using GeneratePress WordPress Theme and having a problem with adding Breadcrumbs for your website? All right, you are in right place. Please read this article carefully. In this article, we are describing two different ways to add Breadcrumbs into your website, if you are using the GeneratePress WordPress theme. Let’s see, How To Add Breadcrumb In GeneratePress WordPress Theme.

However, GeneratePress doesn’t have built-in breadcrumbs. Don’t worry about it, it is so easy to add breadcrumbs from a third party plugin using hooks.

We will use Yoast SEO free WordPress plugin for the examples below but the method should apply to any breadcrumb plugins. You can use any third party breadcrumbs. There is no single issue. All other plugins will be working as usual.

Enable Yoast SEO Breadcrumbs

Yoast SEO offers a breadcrumb feature. This feature is disabled by default. To use the Yoast SEO plugin’s Breadcrumbs, you must have to “Enable” the breadcrumbs feature from your dashboard.

go to SEO → Search Appearance → Breadcrumbs and enable the breadcrumb feature.
Enabling Yoast SEO Breadcrumbs:

Follow These Steps:

  1. Log in to your WordPress website. When you’re logged in, you will be in your “Dashboard”.
  2. Go to Yoast SEO => Search Appearance => Breadcrumbs
  3. Then Enable the breadcrumbs settings and click the Save Changes button.
How To Add Breadcrumb For Generatepress WordPress Theme Yoast Settings
How To Add Breadcrumb For Generatepress WordPress Theme Yoast Settings

Adding Breadcrumbs In GP Using Hooks Element

If you have GP Premium, then the easiest method is to use our Hooks Element. Just follow these steps to Adding Breadcrumbs Using Hooks Element.

Follow These Steps:

  1. Go to Appearance => Elements. Click Add New and select Hook to create a new hook element.
  2. Add the shortcode provided by Yoast: “Home / How To Add Breadcrumbs In GeneratePress Theme
    You can read Yoast SEO official article if you want to know more details about their shortcode: Implementation Yoast SEO Breadcrumbs
  3. In the Hook dropdown list, select the desire location for the breadcrumbs to show using the visual guide. The usual option is the "before_entry_title" hook.
  4. Make sure Execute Shortcodes checkbox is checked.
  5. Go to the Display Rules tab and select Post under the Location dropdown list.

After this hook element is published, the breadcrumbs should now display in posts.

Adding Breadcrumbs In GP Using Functions

If you don’t have GP Premium, then the PHP code below is required to display breadcrumbs. Please copy this PHP code and past it into the bottom of the functions.php file.

Follow These Steps:

  1. From dashboard, go to Appearance => Theme Editor => edit functions.php file
  2. Then copy the PHP code and past it into the bottom of the funtions.php file
add_action( 'generate_after_header', function() {
    if ( function_exists('yoast_breadcrumb') ) {
        yoast_breadcrumb( '<div class="grid-container grid-parent"><p id="breadcrumbs">','</p></div>' );
} );

You can move the breadcrumbs by replacing generate_after_header hook with the desired hook. Read the article to know about all hooks that are using GeneratePress Theme. Check here The visual guide for all Generatepress theme hooks.

You May Also Read Our Recently Published Articles:

Our Small Request, Please, Subscribe to Us!

We will send you notifications for every new blog post. You can unsubscribe at any time.

2 comments on “How To Add Breadcrumbs In GeneratePress Theme

  1. Bro this question is not related to breadcrump issue but I want to ask you that how much post is require in each category

    1. Hey, techno vedant!

      Thanks for your comment. Your question isn’t fully clear. For the kind information, You can create a category without having any single post. There won’t be a problem.

      But can I know the exact reason, Why you are thinking about it?

Leave a Reply to This Post

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 125 other subscribers

HostGator Cyber Week Sale! November 25th at 1:00 PM CST To December 1st at 11:59 PM
HostGator Cyber Week Sale 2020
HostGator Cyber Week Sale 2020
Recent Posts
Recent Comments