Breadcrumbs issue.

#926048
  • Dear Rank Math Support Team,

    I am facing an issue with breadcrumbs on my website while using Rank Math for SEO. Here’s an overview of the problem:

    Setup:

    I have enabled breadcrumbs in the Rank Math settings.
    I am using the Porto theme and its block for displaying breadcrumbs on pages and category pages to achieve a custom look.
    For single product pages, I am using custom code (shared below) to display breadcrumbs.
    The Issue:

    Breadcrumbs work fine on product pages, and the schema is correctly applied.
    On category pages and other pages, however, I am encountering schema errors in Google’s Rich Results Test.

    Additionally, the last link of breadcrumbs is not appearing in the snippet on these pages.
    Custom Code Being Used:

    php
    Copy code
    // Add Breadcrumbs to Single Product Pages without H1 Title
    add_action( ‘woocommerce_before_main_content’, ‘custom_add_breadcrumbs_to_single_product’, 5 );

    function custom_add_breadcrumbs_to_single_product() {
    if ( is_product() ) {
    if ( function_exists( ‘rank_math_the_breadcrumbs’ ) ) {
    woocommerce_breadcrumb();
    }
    }
    }

    When I remove this code, the errors go away on category and other pages, but breadcrumbs schema is also removed from product pages.
    What I Need Help With:

    Resolving schema errors on category pages and other pages while retaining the schema and proper display of breadcrumbs on product pages.

    Ensuring that the last breadcrumb link (e.g., “Men’s Biker Jackets”) is not displayed properly in the schema and snippet for all pages.

    Could you please guide me on how to resolve this issue while maintaining the custom look of my breadcrumbs?

    Looking forward to your assistance.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for any inconvenience this issue may have caused you.

    For initial troubleshooting, please follow our guide here:
    https://rankmath.com/kb/how-to-fix-either-name-or-item-name-should-be-specified-error/

    Looking forward to helping you.

    Its not working. as i said earlier just last title is missing from title, i add this code to function.php file and what should i use instead of EXAMPLE in the code.

    Hello,

    The code that you are using is adding the WooCommerce breadcrumbs to the page, instead of our own breadcrumbs.

    You have an if statement checking if our breadcrumbs exist but then call the function woocommerce_breadcrumb() to call the WooCommerce breadcrumbs.

    Having said that, the current breadcrumbs on the category page you shared in the screenshots is not from WooCommerce or Rank Math so to get the issue fixed you would need to contact your theme provider as that seems to be the one adding the breadcrumbs to the page.

    Don’t hesitate to get in touch if you have any other questions.

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

You must be logged in to reply to this ticket.