Editing archive-product.php
-
Hi,
I just want to ask if it’s possible to edit the query post of archive-product.php. I just want to sort the result of my product base on category and tags. I know how to do this on page templates but just wondering if it’s possible of doing this on archive-product. The problem that I encounter is when I query post the tags it works but when i try it using category it doesn’t work. Here’s my code
$args = array( ‘post_type’ => ‘product’, ‘posts_per_page’ => -1, ‘product_tag’ => ‘female’, ‘product-cat’ => ‘6th-avenue’, );
$loop = new WP_Query( $args );
while ( $loop -> have_posts() ) : $loop -> the_post();Thanks.
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Editing archive-product.php’ is closed to new replies.