Displaying related posts in a custom post type by a custom taxonomy
If you want to query for multiple taxonomy terms you can use the more advanced, tax_query argument of WP_Query queries. For instance //Get array of terms $terms = get_the_terms( $post->ID , ‘product_tags’, ‘string’); //Pluck out the IDs to get an array of IDS $term_ids = wp_list_pluck($terms,’term_id’); //Query posts with tax_query. Choose in ‘IN’ if want … Read more