Home Forums WoodMart – Premium Template Disable Single Product Pages

This topic contains 9 replies, has 2 voices, and was last updated by Artem Temos Artem Temos 7 months, 3 weeks ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #161442

    rivmedia
    Customer

    I 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?

    #161449

    Hello,

    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

    #162034

    rivmedia
    Customer

    Is there a way to disable the product title links on certain pages then??

    #162154

    Unfortunately, there is no such possibility in WooCommerce either. You can’t disable links to single product pages for certain pages.

    #162261

    rivmedia
    Customer

    Damn. 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.

    #162283

    Could you please send us a screenshot where exactly do you want to remove that link and send us a link too?

    #162560

    rivmedia
    Customer

    Here 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/q94f1c

    Private Content Hidden
    #162580

    Try 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;
    }
    #162842

    rivmedia
    Customer

    Simplest method is usually the best lol. That worked great, thank you!

    #162856

    Great! You are welcome! Feel free to contact us if you will have any questions.

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.