Is it possible to remove the WooCommerce shopping cart from my navigation bar?
I apologize if this has been asked already but there is no search for within each forum.
Is it possible to remove the WooCommerce shopping cart from my navigation bar?
I apologize if this has been asked already but there is no search for within each forum.
I don’t recall someone asking this question before.
Add this magic code to Theme Options - Other - Custom CSS. It will hide WooCommerce shopping cart from top navigation.
.woo-menu-cart {
display: none !important;
}
Great! thank you for all of your support!
I’ve been looking for this solution all over the net for days until I found these simple lines
.woo-menu-cart {
display: none !important;
}
A big thank you!
Hide add to cart from product pages . You can use this code in woocommerce.php (located wp-content/plugins/woocommerce):
function WpBlog() {
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart');
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart');
return WooCommerce::instance();
}
And for the specific product pages you can hide add to cart button by adding the code in functions.php
add_filter('woocommerce_is_purchasable', 'wpblog_specific_product');
function wpblog_specific_product($purchaseable_product_wpblog, $product)
{
return ($product->id == specific_product_id (512) ? false : $purchaseable_product_wpblog);
}
For reference you can see How To Hide or Disable Add To Cart Button In WooCommerce Store