ID); $rTag = wp_get_post_tags($post->ID); $args = array( 'tax_query' => array( 'relation' => 'OR', array( 'taxonomy' => 'category', 'field' => 'id', 'terms' => $rCateogry, ), array( 'taxonomy' => 'tag', 'field' => 'id', 'terms' => $rTag, ), ), 'posts_per_page' => 3, 'post__not_in' => array($post->ID) ); $query = new WP_Query( $args ); if ( $query->have_posts() ) : ?>