I'm currently developing an e-commerce store using Wordpress and WooCommerce. I'm planning on creating a basic product filtering system and was wondering if it's possible to wp_query the results shown by the default archive-product.php, I'm assuming archive.php works by simply querying custom post types with the category of 'product'.

Thanks in advance for any help!

1 Answer 1


you can use taxonomy-product_cat.php for product's categories.

and you can write your custom code with post-type='product' and tax-query.

  • I've got a basic idea of what you're on to, however I'm not entirely sure. Any further insight would be great! Mar 22, 2016 at 14:06
  • did you work custom post types and custom taxonomies? there is no different.. '$args = array( 'post_type' => 'product', 'tax_query' => array( array( 'taxonomy' => 'product_cat', 'field' => 'slug', 'terms' => 'term slug name', ), ), ); $query = new WP_Query( $args );' this code lists custom term products. codex.wordpress.org/Class_Reference/…
    – sakarya
    Mar 22, 2016 at 16:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.