I need some help creating a custom archive page that pulls in taxonomy categories instead of individual posts.
I have set up a custom post type of "products". Products has 2 taxonomies attached to it (Series, Product_type)
Series has 20 categories with 5ish products in each.
Product Type has 2 categories (Exterior & Garden) with 100+/- products to be added (all will be grouped in different series).
How can I create an archive page for "Exterior" that pulls in all the "series categories" (not the single product pages but the parent categories).
Example: User clicks Exterior in navigation bar and is taken to a page that shows all exterior product series. The user can then click on a series and be taken to the next page that shows them all products in that series.
I have already added the featured images to my series categories via: WPCustom Category Image.
I have tried this so far and its not working:
Created a page called archive-exterior-lighting.php and added to my theme folder.
<?php /* Template Name: Exterior Lighting Archives */ get_header(); $args = array( 'post_type' => 'products', 'tax_query' => array( 'relation' => 'AND', array( 'taxonomy' => 'product_type', 'field' => 'term_id', 'terms' => 104 ), array( 'taxonomy' => 'series' ) ) ); $posts = get_posts( $args ); ?>
Can anyone help me out with this?