-
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.
You must be logged in to reply to this ticket.