Home>Support>custom post loop query based on woo-commerce product category

custom post loop query based on woo-commerce product category

Hi,
I have woo-commerce, I have been set the post-type on “product” for post loop widget and it’s working fine, but I want to filter the same on specific product category, I tried to do this by utilizing “Additional(dditional query arguments. See query_posts.)” field, but I couldn’t do that till now, can someone helps me in this,
I tried below opsyions in the field but didn’t work.

tax_query=array(array('taxonomy'=>'product_cat','terms'=> 222,'operator'=> 'IN'))

========

cat=222

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 6 years, 8 months ago ehsan aghaei

    After debugging below file,
    “wp-content/plugins/siteorigin-panels/inc/widgets/post-loop.php”
    I found the correct query format like below.

    &product_cat=webinar
    
  2. 6 years, 7 months ago Alex S
    Hi, I Work Here

    Hi Ehsan,

    I’m glad you were able to find a solution. I’m sorry I wasn’t able to be of assistance this time.
    With that said, you should be able to use the taxonomies field to accomplish this as that field will allow you to select categories to ensure that products returned belong to that category.

    Please be sure to post another thread if you have any other questions.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More