Home Forums WoodMart support forum Remove breadcrumbs from shop

Remove breadcrumbs from shop

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #77551

    suseo
    Participant

    Hey,

    Can you give me a snippet I can put in the functions.php to remove the breadcrumbs from the shop page? I have enabled the yoast breadcrumbs.

    #77556

    Artem Temos
    Keymaster

    Hi,

    You can find it in WooCommerce documentation https://docs.woocommerce.com/document/customise-the-woocommerce-breadcrumb/#section-4

    Regards

    #77557

    suseo
    Participant

    That code did nothing for me, breadcrumbs are still there:

    add_action( ‘init’, ‘woo_remove_wc_breadcrumbs’ );
    function woo_remove_wc_breadcrumbs() {
    remove_action( ‘woocommerce_before_main_content’, ‘woocommerce_breadcrumb’, 20, 0 );
    }

    #77558

    Artem Temos
    Keymaster

    Please, provide us your admin access so we can login and check this on your side. Also, send us a screenshot where exactly did you put the code.

    Thank you in advance.

    #77561

    suseo
    Participant

    Related question, but is there any better way of me adding the breadcrumbs above the title on the shop rather than editing the file in inc/template-tags.php ?

    At the moment, I’m adding the following to insert them above the title:

    	<div class="woodmart-woo-breadcrumbs">
    		<?php woodmart_current_breadcrumbs( 'shop' ); ?>
    		<?php woocommerce_result_count(); ?>
    	</div>

    But is there any actions/hooks I can use this to do it? It would save me having to update this file whenever the theme updates.

    #77583

    Artem Temos
    Keymaster

    Unfortunately, there are no any hooks at that place in our theme. We will consider adding some hooks there in our future updates.

    #77669

    suseo
    Participant

    Login details below for the question around removing breadcrumbs…

    Attachments:
    You must be logged in to view attached files.
    #77671

    Artem Temos
    Keymaster

    You need to place that code to the functions.php file in your child theme. And quotes symbols are wrong there. They should be like this ' https://gyazo.com/852e9680848e18e979893578c8a3eae3

    Regards

    #77715

    suseo
    Participant

    The snippets plugin works the same way as the functions.php as far as I’m aware. I add all my code snippets via this plugin.

    Gave it a go in the functions.php anyway and it still isn’t working. Corrected the issue with incorrect ‘.

    Any ideas?

    #77739

    Artem Temos
    Keymaster

    You have enabled Yoast breadcrumbs for shop that is why it can’t be removed with WooCommerce hooks.

    #77752

    suseo
    Participant

    Is there a hook to remove the Yoast Breadcrumbs from this position?

    #77753

    Artem Temos
    Keymaster

    Disable this option in Theme Settings -> Page title and then use your hooks for WooCommerce.

Viewing 12 posts - 1 through 12 (of 12 total)