对于那些通过谷歌登陆这里的人,我自己找到了一个答案:
$taxq = array(
array(
\'taxonomy\' => \'story_lng\',
\'field\' => \'id\',
\'operator\' => \'NOT EXISTS\',
)
);
这导致
AND (NOT EXISTS( SELECT
1
FROM
wp_term_relationships
INNER JOIN
wp_term_taxonomy ON wp_term_taxonomy.term_taxonomy_id = wp_term_relationships.term_taxonomy_id
WHERE
wp_term_taxonomy.taxonomy = \'story_lng\'
AND wp_term_relationships.object_id = wp_posts.ID))
AND wp_posts.post_type = \'story\'
AND (wp_posts.post_status = \'publish\'
OR wp_posts.post_author = 1
AND wp_posts.post_status = \'private\')
wich与Pieter Goosen建议的基本相同,但合并到一个查询中(代码行更少)。