我想将自定义帖子显示为“问题”页面。我可以硬编码“术语”,例如。issue-3
, 但是我怎么才能只显示最新的呢?
$the_query = new WP_Query(
array(
\'post_type\' => \'news\',
\'posts_per_page\' => \'-1\',
\'tax_query\' => array(
array(
\'taxonomy\' => \'issue_filter\',
\'field\' => \'slug\',
// \'terms\' => \'category\' this is good
\'terms\' => \'issue-3\'
)
)
)
);
while ( $the_query->have_posts() ) : $the_query->the_post();