adding breadcrumb to divi

#910648
  • Resolved Zulham Efendi
    Rank Math free

    I tried to add the PHP code to the single.php file, but I did not succeed. There was an error message at the bottom when I tried to save it.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello, we apologize for the issue you are facing while trying to add breadcrumbs to your Divi theme. If you’re encountering an error when saving changes to the single.php file, it could be due to a few reasons, such as syntax errors or file permission issues.

    Instead of directly editing the single.php file, we recommend using a child theme to avoid any potential issues with updates and to ensure that your changes are preserved. Here’s how you can add breadcrumbs in Divi:

    1. Use the Divi Builder: Open the page where you want to add breadcrumbs and click on the Use The Divi Builder button.

    2. Add a Code Module: In the Divi Editor, add a new module by clicking the plus icon and then search for Code.

    3. Insert the Breadcrumb Shortcode: Add the following shortcode in the Code module:

      [rank_math_breadcrumb]
    4. Save Changes: After adding the shortcode, make sure to save the module and then publish the changes.

    This method allows you to add breadcrumbs without directly modifying theme files, which can help prevent errors. If you continue to experience issues, please reply to this ticket, and a human agent from the Rank Math Support team will assist you further.

    Sources:
    How to Enable Breadcrumbs on Your Website With Rank Math SEO » Rank Math

    Hello,

    Try removing the opening and closing php, i.e. using this instead:

    if (function_exists('rank_math_the_breadcrumbs')) rank_math_the_breadcrumbs();
    

    You can also try adding it to your header.php file or you can speak with your theme developer for advice on the best place to add the breadcrumb PHP code.

    Don’t hesitate to let us know if you need help with anything else.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)

The ticket ‘adding breadcrumb to divi’ is closed to new replies.