How to change products preview type of category wise?

This topic has 13 replies, 2 voices, and was last updated 3 years ago ago by Rose Tyler

  • Avatar: Ladusha
    Ladusha
    Participant
    June 20, 2021 at 12:02

    I’am already disabled all categories and all products additional preview type using below css code. but I want to add this feature for selected category. How can do it?

    css code – .content-product .product-image-wrapper,
    .content-product .product-title {
    pointer-events: none;
    }

    12 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    June 20, 2021 at 12:10

    Hello,

    Please describe the desired result in more detail, provide URL of the category.

    Regards

    Avatar: Ladusha
    Ladusha
    Participant
    June 20, 2021 at 16:44

    Now all products showing in small icon on page. can’t open products. (I’m disabled using css code) I want to apply this feature for only selected main product category. ex – Electronic category products can be open using click on the product. but grocery category products can’t shuld be open by click on the product. (only showing product icon only)

    Avatar: Ladusha
    Ladusha
    Participant
    June 21, 2021 at 16:59

    Please be kindly answer to me.

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    June 22, 2021 at 12:26

    Hello,

    Sorry for the delay in answering.
    Change the code to:

    .term-grocery .content-product .product-image-wrapper,
    .term-grocery .content-product .product-title {
        pointer-events: none;
    }

    .term-grocery is the class of your grocery category page.

    Regards

    Avatar: Ladusha
    Ladusha
    Participant
    June 23, 2021 at 04:20

    It’s not working dear. Can you do this using admin login?

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    June 23, 2021 at 07:16

    As I can see, you added

    .term-Grocery .content-product .product-image-wrapper,.term-Grocery .content-product .product-title {
            pointer-events: none
     }

    but it should be

    .term-grocery .content-product .product-image-wrapper,
    .term-grocery .content-product .product-title {
        pointer-events: none;
    }

    just copy and paste the code,
    or provide temporary wp-admin access via the Private Content area.

    Regards

    Avatar: Ladusha
    Ladusha
    Participant
    June 23, 2021 at 10:55

    Re:How to change products preview type of category wise?

    Please contact administrator
    for this information.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    June 23, 2021 at 10:59
    Avatar: Ladusha
    Ladusha
    Participant
    June 29, 2021 at 04:04

    It’s working on https://gedaratama.lk/product-category/grocery/ Link only. but at the shop page and products search results it’s not working… why?

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    June 29, 2021 at 11:58

    Because the code was given for the mentioned category only. Do you want to make products on Shop and in the search results unclickable too?

    Regards

    Avatar: Ladusha
    Ladusha
    Participant
    June 30, 2021 at 04:57

    Yes! How can do it?

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    June 30, 2021 at 08:55

    Hello,

    I’ve changed the custom CSS code. Clear cache and check now.

    Regards

  • Viewing 13 results - 1 through 13 (of 13 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.