How To Add Breadcrumbs To The League WordPress Theme

Are you using The League 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 how to add Breadcrumbs into your WordPress website, if you are using the “The League” WordPress theme. Let’s see, How To Add Breadcrumbs To The League WordPress Theme.

However, The League WordPress theme 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 or a simple function.

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:

  • 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 Breadcrumbs To The League WordPress Theme - WpFresher
How To Add Breadcrumbs To The League WordPress Theme – WpFresher

Adding Breadcrumbs To The League Theme Using Functions

The PHP code below is required to display breadcrumbs to your The League WordPress theme. Please copy this PHP code and past it to the bottom of the header.php file.

Follow These Steps To Add Breadcrumbs in The League Theme:

From dashboard, go to Appearance => Theme Editor => edit header.php file
Then copy the PHP code and past it to the bottom of the header.php file. If you don’t sure how to do this then please watch the video guide also.

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

Disable Breadcrumbs on Frontpage or Home Page

If you want to disable Breadcrumbs on the Frontpage or Home page then you can add a simple condition in the above PHP code snippet. After adding that condition then the code will be like the Bellow PHP code snippet. Use this code snippet if you want to Disable Breadcrumbs on Frontpage/Home Page.

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

Add Custom CSS Class In YOAST SEO Breadcrumbs

Additionally, if you want to add a custom CSS class in Breadcrumbs to change the style of your current default Breadcrumbs then you can use the PHP code snippet that is given below.

<?php
    if ( function_exists('yoast_breadcrumb') && !is_front_page() ) {
	yoast_breadcrumb( '<div class="urldev-custom-css-class"><p id="breadcrumbs">','</p></div>' );
    }
?>

Watch Our Video Guide To Add Breadcrumbs in The League Theme

Video Title: How To Add Breadcrumbs To The League WordPress Theme By UrlDev

Want to watch this video on YouTube?

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.

Leave a Reply

Over 2,500+ Readers

Follow us to get every update

Facebook,
YouTube,
Twitter,
Instagram,
Linkedin

Subscribe to Get Updates

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