Support » Plugin: WooCommerce » Product Category shortcode does not work

  • Hello guys,

    I try to create a page showing products that belong to two categories. This is my shortcode for the page: [product_category category=”accessories,sales” columns=”4″ operator=”AND”]. Normally, this shortcode should return the products that belong to category “accessories” AND “sales”. Well this does not happen. It just returns products in a way I cannot understand.

    I talked with the theme author and she said that this has to do with woocommerce. Has anyone else experienced the same problem? Is there an alternative?

    Thank you very much 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Mike Jolley

    (@mikejolley)

    Seems to be working here; make sure you’re not using ‘pretty’ quotes in the shortcode or those params will be ignored.

    Hello Mike,

    Thank you for your answer. Well, it is pretty weird. I tried to query a category under the slug “sales” and returned nothing although there are 10 products assigned to it. When I changed the slug it returned the correct products.

    Probably a matter of cache or database corruption, not sure.

    Thank you anyway.

    Hello,

    It seems that it after a few days the shortcode still returns the wrong products. I cannot find the cause. It is pretty weird. This is my shortcode:
    [product_category category=”accessories,on-sale” columns=”4″ operator=”AND”][/vc_column_text]

    It should return the products that belong to both categories, instead it return random products.

    Any ideas why this might happen? Before I changed the slug, which worked for a few days, I changed the parameters of the shortcode and each time I did that it returned the correct products. After a few days, it returned random.

    This happened after I upgraded to the major update.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Product Category shortcode does not work’ is closed to new replies.