$args = array (
'artists' => array('Smith', 'Jones', 'Gordon Jeffrey Kensingtor III jr.'),
'post_type' => array('posts', 'clips, 'albums', 'events')
);
$related = new WP_QUERY($args);
它不起作用。我究竟做错了什么?非常感谢你。
答案 0 :(得分:1)
你试试这个
$args = array(
'post_type' => array('post', 'clips', 'albums', 'events'),
'tax_query' => array(
array(
'taxonomy' => 'artists',
'field' => 'slug',
'terms' => array('Smith', 'Jones', 'Gordon Jeffrey Kensingtor III jr.')
)
)
);
$related = new WP_Query( $args );