bread crumbs

#1022570
  • Resolved mike mike
    Rank Math free

    Hello RankMath technician, I use acf to make product categories. I use the breadcrumb shortcode in elementor to display them. Now I want to delete or hide this product. I also set Hide Taxonomy Name in the RankMath backend, but it is still displayed in the frontend. How can I delete or hide this product? This is in the product details page template I made. I need to delete or hide all of them.

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention.

    In this case, you can try this filter to remove the 2nd crumbs or “Products” from the breadcrumbs of your single product pages:

    add_filter( 'rank_math/frontend/breadcrumb/items', function( $crumbs, $class ) {
        if( is_product()) {
    			unset($crumbs[1]);
            $crumbs[1] = [
    				$category->name,
    				site_url( $category->slug ),
    				'hide_in_schema' => false,
    			];
    		return $crumbs; 
        }
        return $crumbs;
    }, 10, 2); 

    Here’s a guide on how to add the code to your site:
    https://rankmath.com/kb/filters-hooks-api-developer/

    Looking forward to helping you.

    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 1 replies (of 1 total)

The ticket ‘bread crumbs’ is closed to new replies.