Hello,
Thank you for contacting us and bringing your concern to our attention.
You can use the following filter code on your website to remove the Breadcrumb schema from specific pages based on their URL:
add_filter( 'rank_math/snippet/breadcrumb', function( $entity ) {
$urls_to_skip = array(
'http://yoursite.com/page-url-1',
'http://yoursite.com/page-url-2'
);
$current_url = home_url( add_query_arg( null, null ) );
if ( in_array( $current_url, $urls_to_skip ) ) {
return false;
}
return $entity;
});
Please make sure to replace http://yoursite.com/page-url-1
with your actual page URL.
Here’s how you can add filter/hook to your WordPress site: https://rankmath.com/kb/wordpress-hooks-actions-filters/
Let us know how it goes. Looking forward to helping you.
Thank you.
Thanks. This doesnt seem to be working for me. I’m still getting two breadcrumblist results on the schema test.
Hello,
Could you please share the affected URL so we can check as well?
You can add it to the sensitive data section by editing your first post
It is completely secure, and only our support staff has access to that section.
Also, did you use an Elementor widget to add the breadcrumbs on your site? Or have it applied to your theme files?
Looking forward to helping you.
Hello,
I have updated the sensitive data as requested. Can you please check further?
Thank you.
Hello,
It appears that your URL has a trailing slash as the final URL path. Can you please include that in the array?
You may check the updated code snippet we shared in the Sensitive Data section.
Hope that helps.