Viewing 1 replies (of 1 total)
  • Plugin Contributor titodevera

    (@titodevera)

    Hi villiamjit,

    Add the code below to your functions.php:

    
     /**
      *	 Removes "Brands" from the WooCommerce breadcrumbs
      */
     function custom_pwb_unset_brands_crumb( $crumbs ) {
    
    	 if ( is_tax( 'pwb-brand' ) ) {
    
    		 foreach ( $crumbs as $crumb_key => $crumb ) {
    
    			 //unset the "Brands" crumb
    			 if ( isset( $crumb[0] ) && $crumb[0] == 'Brands' ) {
    				 unset( $crumbs[$crumb_key] );
    				 $crumbs = array_values( $crumbs );//restore array keys
    				 break;
    			 }
    
    		 }
    
    	 }
    
    	 return $crumbs;
     }
     add_filter( 'woocommerce_get_breadcrumb', 'custom_pwb_unset_brands_crumb' );
    

    ??

Viewing 1 replies (of 1 total)
  • The topic ‘Remove Brands from Breadcrumb’ is closed to new replies.