Sto tentando di visualizzare un tipo di post personalizzato con tassonomia personalizzata, ma non ho fortuna. Non sta arrivando nulla Apprezzo qualsiasi aiuto.Tassonomia personalizzata WP_Query
Post Tipo = galleria
personalizzato Tassonomia slug = photoarea
Il 'photoarea' Voglio visualizzare = quarta
<?php
$args = array(
'post_type' => 'gallery',
'tax_query' => array(
array(
'taxonomy' => 'photoarea',
'field' => 'fourth',
)
),
'posts_per_page' => 10,
);
$the_query = new WP_Query($args);
if ($the_query->have_posts()) : while ($the_query->have_posts()) : $the_query->the_post();
the_post_thumbnail();
endwhile; endif;
wp_reset_query();
?>
Non funziona per me. Attiva un avviso PHP. –
hai bisogno di 'campo' => 'lumaca' e 'termini' => 'quarto' per ottenere questo lavoro, non 'termine'. –