如何从custom\\u taxonomy发布最后一篇文章?我试过这样做,但没用。
$terms=get_terms(\'tax_name\');
$request=array();
if(count($terms)>0)
{
foreach($terms as $t)
{
$request[]=$t->slug;
}
}
query_posts(
array(
\'tax_query\' => array(
\'taxonomy\' => \'tax_name\',
\'field\' => \'slug\',
\'terms\' => $request,
)
)
);
while ( have_posts() ):the_post();