Tuesday, 17 September 2013

WordPress/WooCommerce: Cannot Specify Product Category In WP_Query

WordPress/WooCommerce: Cannot Specify Product Category In WP_Query

I'm trying to set up a custom loop that cycles through products assigned
to a product category, but it doesn't seem to be working.
My category setup:
Factory Direct - FD1 - FD2 - FD3
I want my loop to display products that fall into ANY CHILDREN CATEGORIES
of Factory Direct which has an ID of 84.
My attempt at coding this in my template: http://paste.laravel.com/RYK
I have tried changing the ID from 84 to a specific category (example FD1
which has an ID of 24), but it still isn't working.
Any ideas/suggestions?
It loops through products if I remove the cat argument in WP_Query, but I
can't specify my loop.
Thanks!

No comments:

Post a Comment