Question

I'm trying to show all the posts associated with a Taxonomy (not a term) but it seems to not work.

<?php

$args = array(
    'post_type' => 'projects',
    'tax_query' => array(
        array(
            'taxonomy' => 'clients',
            'terms' => 'Unilever'
        )
    )
);
$the_query = new WP_query();
$the_query->query($args);

if($the_query->have_posts()):while($the_query->have_posts()):$the_query->the_post();

php the_title();


endwhile; endif;
wp_reset_query();

?>

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top