• Resolved nishkam

    (@nishkam)


    Hello,

    I have used woocommerce to build my website and on the homepage of my website I have used the woocommerce [products] shortcode to display products from the Shop page.

    I also used some attributes to define the items I would like displayed:
    [products limit=”4″ orderby=”date” order=”DESC” columns=”4″]

    The problem I am having is that I have a product category called “packages” and I didn’t want products in this category to be visible on the homepage. I was wondering if there was a way to hide products from this category using the shortcode attributes?

    In the documentation, there is an attribute called “cat_operator” and an option called “NOT IN” to exclude products in the selected category.

    Pls see herer:
    https://prnt.sc/113pxt6

    I tried adding: cat_operator=”NOT IN packages” to the shortcode so it reads:

    [products limit=”4″ orderby=”date” order=”DESC” cat_operator=”NOT IN packages”]

    But it doesn’t work. I have also tried a few different combinations but I still didn’t have any luck.

    I’m not sure if I misunderstood the function of the said attributes but is there any way I can hide products from the packages category from showing on the homepage?

    Many thanks,

    Jas

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘I want to hide products from a category when using the [products] shortcode’ is closed to new replies.