Hello,
To customize the breadcrumbs on your single product pages in Rank Math and hide specific elements like "camisetas" and "confederaci贸n," you can use the following filter code snippet:
/**
* Filter to remove categories from Rank Math Breadcrumbs.
*/
add_filter( 'rank_math/frontend/breadcrumb/items', function( $crumbs, $class ) {
// Check if we are viewing single posts
if(is_singular('post')) {
// Unset elements with key 1
unset($crumbs[1]);
$crumbs = array_values($crumbs);
return $crumbs;
}
return $crumbs;
}, 10, 2);
This filter will help you remove categories from being displayed in the breadcrumbs of your posts and pages. You can add this code snippet to your theme’s functions.php file or use a custom plugin like Code Snippets to add this code.
If you need further assistance or have any questions, feel free to reach out. We’re here to help!
Thank you for reaching out and happy customizing your breadcrumbs!
Sources:
How to Customize Breadcrumbs in Rank Math 禄 Rank Math
How to Enable Breadcrumbs on Your Website With Rank Math SEO 禄 Rank Math
This is an automated reply from Rank Math Support Bot. If you need further assistance, please reply to this topic and a human support agent will reply to you shortly.
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.