All Collections
FAQ's and Troubleshooting
How to Easily Add SEO Breadcrumbs to Your Divi Website with Rank Math
How to Easily Add SEO Breadcrumbs to Your Divi Website with Rank Math

Learn how to easily add SEO breadcrumbs to your Divi website using the Rank Math SEO plugin.

Fozla Rabbi avatar
Written by Fozla Rabbi
Updated over a week ago

The Rank Math SEO plugin simplifies the process of incorporating SEO breadcrumbs into your Divi website. In this comprehensive guide, we will walk you through the steps to enable breadcrumbs, tailor their appearance, and specify where they should be displayed on your site.

Method One: Using a Shortcode:

  1. Install and activate the Rank Math SEO plugin.

  2. Navigate to Rank Math > General Settings > Breadcrumbs.

  3. Activate the "Enable Breadcrumbs" option.

  4. (Optional) Personalize the appearance of the breadcrumbs to align with your site's design.

  5. To effortlessly display the breadcrumb trail without going into PHP code, simply copy the [rank_math_breadcrumb] shortcode. For Divi pages/theme builder templates, you can employ a Text Module or Code Module to insert this shortcode.

Method Two: Implementing breadcrumbs with PHP

Note: This method requires a child theme to be installed and active. The child theme can be created using this tutorial.

To integrate breadcrumbs into your pages and posts using this method, you'll need to make adjustments in a child theme's single.php file.

  1. Copy the single.php file's code from the parent Divi theme and create a new file named single.php within your child theme directory in your theme folder in wp-content > themes > Divi. Paste the contents from the parent theme's single.php file into this new file.

  2. Insert the following line of code:

    <?php if (function_exists('rank_math_the_breadcrumbs')) rank_math_the_breadcrumbs(); ?>

    This code should be placed after this line in the single.php file:

    $is_page_builder_used = et_pb_is_pagebuilder_used( get_the_ID() );

    After implementing this code, your file will display the following:

  3. Add the following code to your child theme's functions.php file:

    * Register theme support for Rank Math breadcrumbs
    add_theme_support( 'rank-math-breadcrumbs' );

    After including this code, your functions.php file will appear as follows:

With these adjustments in place, your breadcrumb functionality will seamlessly enhance your website's user experience and navigation.

Note: It's always recommended to take a backup of the site before making adjustments to any PHP code. To do this, use a WordPress backup plugin like UpdraftPlus. If you're not familiar with UpdraftPlus, you can follow this guide to learn how to create a backup using the plugin.

Furthermore, using FTP or cPanel to access the file manager is recommended. This will enable you to safely implement changes and, in the event of any issues during the tutorial, easily revert back to the previous state.

Did this answer your question?