WordPress ha deprecato l'uso della sintassi abbreviata per reperire i post di una tassonomia usando il suo slug.
Il seguente codice:
$args = array(
'post_type' => 'cpt'
'tassonomia' => 'test',
'posts_per_page' => -1
);
$loop = new WP_Query( $args );
Va riscritto in questo modo:
$args = array(
'post_type' => 'cpt'
'tax_query' => array(
'taxonomy' => 'tassonomia',
'field' => 'slug',
'terms' => 'test'
),
'posts_per_page' => -1
);
$loop = new WP_Query( $args );