Suggestion: Remove The Image Link Too
-
You could add the option to remove the image link from the product loop. I have done this using the below snippet. Replacing the anchor link with a div assists with style customization.
function vr51_woocommerce_template_loop_product_link_open() { echo '<div class="woocommerce-LoopProduct-container">'; } function vr51_woocommerce_template_loop_product_link_close() { echo '</div>'; } 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 ); add_action( 'woocommerce_before_shop_loop_item', 'vr51_woocommerce_template_loop_product_link_open', 10 ); add_action( 'woocommerce_after_shop_loop_item', 'vr51_woocommerce_template_loop_product_link_close', 5 );
Though I use a div you could instead keep the A tag but remove the target product page link. This would retain any theme styles applied to a.woocommerce-LoopProduct-link.
Thanks for your plugin. I found it useful.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Suggestion: Remove The Image Link Too’ is closed to new replies.