分类法应为post_format
术语应为post-format-link
. 此外,自3.1以来,简单的分类查询也被弃用,取而代之的是tax_query
:
$args = array(
\'posts_per_page\' => 5,
\'tax_query\' => array(
array(
\'taxonomy\' => \'post_format\',
\'field\' => \'slug\',
\'terms\' => \'post-format-link\'
)
)
);
$recent = new WP_Query( $args );