<?php wp_reset_postdata(); $args = array( 'post_type' => array( 'post', 'unicorn'), 'tax_query' => array( 'relation' => 'OR', array( 'taxonomy' => 'category', 'field' => 'slug', 'terms' => array( 'test' ) ), array( 'taxonomy' => 'unicorn_category', 'field' => 'slug', 'terms' => array( 'blur' ) ) ), ); $the_query = new WP_Query( $args ); ?> <?php if ( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); ?> <h2><?php the_title(); ?></h2> <?php endwhile; endif; ?> <?php wp_reset_postdata(); ?>
Leave a Reply