i have one custom post type 'game' and one custom taxonomy 'console', which is shared by 'game' and 'post'. Now I created a new PHP 'taxonomy-console' and I want to separately display posts from 'post' on the left and posts from 'game' on the right.
the code I am using is:
<?php $slug = $term->slug; $query = new WP_Query(array( 'post_type' => 'post', 'order'=>'DESC', 'tax_query' => array( array( 'taxonomy' => 'console', 'field' => 'slug', 'terms' => $slug, ), ), ) ); if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?> /* bla bla bla */ <?php endwhile; endif; ?>
But neither this nor 'post_type' => 'game' are displaying anything.
The thing is, I am using the same exact code on another taxonomy page, the only difference is that it is registered with only one post_type and doesn't share two post types.