Skip to main content
2 of 2
Made the post less specific to help others with a simialr problem understand it more
Randomer11
  • 416
  • 11
  • 31

Custom post type Category Display

I've been looking at this old theme. I've then created a template file called taxonomy template file and post types. When querying to show only the posts in the category selected. This is the top of my template :

    $args=array ( 
    
            'post_type'=> array( 'events' ),
            'tax_query' => array(  'taxonomy' => 'tax-cat' ), 
            'post_status' => array( 'future' ), 
            'pagination' => true, 
            'paged' => $paged,
            'orderby' => 'post_date',
            'order' => 'ASC', ); 
    $temp = $wp_query; 
    
    $wp_query = null; 
    $wp_query = new WP_Query(); 
    $wp_query->query( $args ); 

Which ive taken from the existing page template, but the above seems to show ALL Posts in the custom post type, rather than just the posts in the category.

Randomer11
  • 416
  • 11
  • 31