Answer the question
In order to leave comments, you need to log in
How to remove the link to the product card in Woocommerce?
Hello!
The problem is this.
I have a wordpress site with woocommerce.
The store page displays a list of products, displays a thumbnail, name, price, and below the "add to cart" button. So, everything except add to cart is a link to a page with a product card, respectively dressed in a tag . And I don't need product cards, I don't need this...
Answer the question
In order to leave comments, you need to log in
somewhere in function.php of the theme
add_action('woocommerce_before_shop_loop_item', 'remove_link', 1);
function remove_link() {
remove_action( 'woocommerce_before_shop_loop_item', 'woocommerce_template_loop_product_link_open', 10 );
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_product_link_close', 5 );
}
I implemented like this:
.woocommerce ul.products li.product .image_frame, .woocommerce ul.products li.product .hover_box_product {
pointer-events: none;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question