get term slug from current posts’s custom taxonomy
This gets the terms: $terms = get_the_terms( get_the_ID(), ‘nieuwssoort’); Then you check the result: $terms_ids = [];//you can set a default id here if(false !== $terms && !is_wp_error($terms)){ foreach($terms as $term){ $terms_ids[] = $term->term_id; } } We check the result just in case. Now, we have the values, let get them into the arguments: $args … Read more