The RankMath SEO plugin simplifies incorporating Breadcrumbs into your Divi website. This comprehensive guide will walk you through the steps to enable breadcrumbs, tailor their appearance, and specify where they should be displayed on your site.
Using a RankMath shortcode to display the Breadcrumbs (easy)
Install and activate the Rank Math SEO plugin.
Go to Rank Math โ General Settings โ Breadcrumbs.
Activate the Enable Breadcrumbs option.
Edit the page/post or the Theme Builder template to where the Breadcrumbs should be displayed
Add the Code module (recommended) or the Text module to your layout
Paste in the RankMath's Breadcrumb shortcode [rank_math_breadcrumb].
Using PHP code to display the Breadcrumbs (advanced)
Notes:
This method requires a Child Theme to be installed and active. The Child Theme can be created following the How To Make A Child Theme guide.
It's always recommended to back up the site before making file changes.
For backing up your website, you can:
Use a WordPress backup plugin like UpdraftPlus.
Follow the How to Take a Backup of Your Website guide.
To easily copy/edit files you can either use
An FTP client to connect to the FTP server
Use the hosting File Manager app
Use a WordPress plugin such as the Advanced File Manager plugin
Copy the single.php file from the parent Divi theme and to the Child Theme's folder
Edit the single.php file from the Child theme and after this line of code:
$is_page_builder_used = et_pb_is_pagebuilder_used( get_the_ID() );?>
Add the following PHP code:<?php if (function_exists('rank_math_the_breadcrumbs')) rank_math_the_breadcrumbs(); ?>
Edit the functions.php file inside the Child Theme's folder and add this PHP code:
/**
* Register theme support for Rank Math breadcrumbs
*/
add_theme_support( 'rank-math-breadcrumbs' );
With these changes, your breadcrumb functionality will seamlessly enhance your website's user experience and navigation.