Home › Forums › WoodMart support forum › Disable Single Product Pages
Disable Single Product Pages
- This topic has 9 replies, 2 voices, and was last updated 5 years, 4 months ago by
Artem Temos.
-
AuthorPosts
-
December 6, 2019 at 6:38 am #161442
rivmediaParticipantI would like to disable the single product pages (ideally for a specific category only) as I have a category of products where it will be quicker/easier for users to add to cart from the archive page, but I don’t want them to get lost/confused if they click on the image or product title and end up in the single product page.
I tried adding the following to my functions.php file but it didn’t do anything:
if ( is_product() && is_product_category( array(‘category-name-here’) ) ) {
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 also tried this:
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 );but even that didn’t work.
Is something else overriding this? Can you help?
December 6, 2019 at 7:17 am #161449
Artem TemosKeymasterHello,
Thank you so much for purchasing our theme and contacting our support center.
Sorry, but there is no such option in our theme and WooCommerce by default. It may require additional code customization or extra plugin but we don’t have an instruction for this. It is out of our theme support scope.
Regards
December 9, 2019 at 7:38 am #162034
rivmediaParticipantIs there a way to disable the product title links on certain pages then??
December 9, 2019 at 2:48 pm #162154
Artem TemosKeymasterUnfortunately, there is no such possibility in WooCommerce either. You can’t disable links to single product pages for certain pages.
December 10, 2019 at 2:41 am #162261
rivmediaParticipantDamn. Is there any workaround you can suggest? I have a client who sells food online. One of her selling points is that customers can pick and choose which dishes they want from within a category. Quickest/simplest way to do this is adding to cart from a list of products rather than having to go into each single product page individually. I have set up the list of products on a dedicated page, but as the title and image is still linked to the single product page if they do happen to click on it, I’m not sure they will easily find their way back.
December 10, 2019 at 7:12 am #162283
Artem TemosKeymasterCould you please send us a screenshot where exactly do you want to remove that link and send us a link too?
December 11, 2019 at 4:16 am #162560
rivmediaParticipantHere is the page (password in private content):
https://www.rivmedia-website-proof.com/shop/divine-meals-delivered/On this page I’m using the product grid element (list view)
I don’t want users to be able to click through to the single product page from this page via either the product title, image or quick view links.
See screenshot: http://prntscr.com/q94f1cDecember 11, 2019 at 7:11 am #162580
Artem TemosKeymasterTry to add the following code snippet to the Custom CSS area in Theme Settings to fix this issue.
.product-title a, .product-image-link { pointer-events: none; }
December 12, 2019 at 12:41 am #162842
rivmediaParticipantSimplest method is usually the best lol. That worked great, thank you!
December 12, 2019 at 6:55 am #162856
Artem TemosKeymasterGreat! You are welcome! Feel free to contact us if you will have any questions.
-
AuthorPosts
- You must be logged in to create new topics. Login / Register