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 Breadcrumbs in GeneratePress 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 plugins Breadcrumbs, you must have “Enable” the breadcrumbs feature from your dashboard.

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

To Enabling Yoast SEO Breadcrumbs Follow These Steps:

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

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’s official article if you want to know more details about their shortcode: Implementation Yoast SEO Breadcrumbs
  3. In the Hook dropdown list, select the desired 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:

  • From dashboard, go to Appearance => Theme Editor => edit functions.php file.
  • Then copy the PHP code and past it into the bottom of the functions.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 the 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.

If you like this article and want to support us, then please subscribe to our YouTube Channel (WpFresher – WordPress Tutorials) for many more WordPress video tutorials. You may also find us on Facebook & Twitter.

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. My brother suggested I might like this blog He was totally right This post actually made my day You can not imagine simply how much time I had spent for this info Thanks

  2. Its like you read my mind You appear to know a lot about this like you wrote the book in it or something I think that you could do with some pics to drive the message home a little bit but instead of that this is fantastic blog An excellent read I will certainly be back

Leave a Reply