Home › Forums › WoodMart support forum › Remove breadcrumbs from shop
Remove breadcrumbs from shop
- This topic has 11 replies, 2 voices, and was last updated 6 years, 2 months ago by Artem Temos.
-
AuthorPosts
-
September 17, 2018 at 2:43 pm #77551
suseoParticipantHey,
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.
September 17, 2018 at 2:47 pm #77556
Artem TemosKeymasterHi,
You can find it in WooCommerce documentation https://docs.woocommerce.com/document/customise-the-woocommerce-breadcrumb/#section-4
Regards
September 17, 2018 at 2:50 pm #77557
suseoParticipantThat 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 );
}September 17, 2018 at 2:50 pm #77558
Artem TemosKeymasterPlease, 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.
September 17, 2018 at 3:01 pm #77561
suseoParticipantRelated 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.
September 17, 2018 at 4:52 pm #77583
Artem TemosKeymasterUnfortunately, there are no any hooks at that place in our theme. We will consider adding some hooks there in our future updates.
September 18, 2018 at 8:16 am #77669
suseoParticipantLogin details below for the question around removing breadcrumbs…
Attachments:
You must be logged in to view attached files.September 18, 2018 at 8:18 am #77671
Artem TemosKeymasterYou 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/852e9680848e18e979893578c8a3eae3Regards
September 18, 2018 at 12:34 pm #77715
suseoParticipantThe 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?
September 18, 2018 at 1:24 pm #77739
Artem TemosKeymasterYou have enabled Yoast breadcrumbs for shop that is why it can’t be removed with WooCommerce hooks.
September 18, 2018 at 2:01 pm #77752
suseoParticipantIs there a hook to remove the Yoast Breadcrumbs from this position?
September 18, 2018 at 2:03 pm #77753
Artem TemosKeymasterDisable this option in Theme Settings -> Page title and then use your hooks for WooCommerce.
-
AuthorPosts
- You must be logged in to create new topics. Login / Register