• Resolved newshop

    (@newshop)


    Hello,
    I want to remove the breadcrumbs completely. I used to to use the following code to achieve that:

    add_action( 'wp', 'woo_remove_wc_breadcrumbs',100 );
    function woo_remove_wc_breadcrumbs() {
    remove_action( 'neve_bc_count', 'woocommerce_breadcrumb' );
    }

    However, with Neve 3.0.11, that doesnt work anymore because you replaced

    add_action( ‘neve_bc_count’, ‘woocommerce_breadcrumb’ );

    with

    add_action( ‘neve_bc_count’, [ $this, ‘render_breadcrumbs’ ] );

    in woocommerce.php and I dont know how to handle “$this”.

    Could you please tell me how to modify my code in order to remove the breadcrumbs?
    I also tried the following code but with no success:

    function hide_breadcrumbs_on_certain_page( $input ) {
    return false;   
    return $input;
    }
    add_filter( 'neve_show_breadcrumbs', 'hide_breadcrumbs_on_certain_page', 10, 1 );
Viewing 2 replies - 1 through 2 (of 2 total)
  • Mat

    (@mateithemeisle)

    Hello @newshop ,

    Thank you for using Neve and apologies for the delayed reply!

    You are right, the old method does not work anymore as there have been some changes in the theme. However, you can use this filter to switch the toggle in the function from true to false and it will forbid Neve to generate the breadcrumbs.

    function custom_remove_bd() {
    	return false;
    }
    
    function remove_bc() {
    
    	add_filter('neve_breadcrumbs_toggle', 'custom_remove_bd');
    }
    add_action('after_setup_theme','remove_bc');

    Thank you and please let us know if this worked for you!

    Thread Starter newshop

    (@newshop)

    Works perfectly, thank you!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Remove breadcrumbs’ is closed to new replies.