WordPress.org

Ready to get started?Download WordPress

Forums

new wp-query wont recognize custom taxonomy (1 post)

  1. Cathy Tibbles
    Member
    Posted 3 years ago #

    This is what I'm using for the query, and it is recognizing all arguments EXCEPT the taxonomy. What/ where can I look to troubleshoot this?

    $args = array(
    'post_type' => 'films',
     'tax_query' => array(
    			'taxonomy' => 'film_category',
    			'field' => 'slug',
    			'terms' => array( 'originalfilms' ) ),
      'posts_per_page' => '6'
    );
    
    $the_query = new WP_Query( $args );
    while ( $the_query->have_posts() ) : $the_query->the_post();
    ...stuff here...
    
    endwhile;
    // Reset Post Data
    wp_reset_postdata();

    THanks!

Topic Closed

This topic has been closed to new replies.

About this Topic