我有一个查询,可以防止没有各种条件的帖子出现,其中之一就是必须有一个特色图片。然而,不管怎样,粘性帖子似乎最终会出现在查询中。我怎样才能做到这一点?
$args = array(
\'posts_per_page\' => $articles_no,
\'meta_key\' => \'_thumbnail_id\',
\'post__not_in\' => $a_empty_titles,
// remove post formats as per theme options ( using $hide from above )
\'tax_query\' => array(
array(
\'taxonomy\' => \'post_format\',
\'field\' => \'slug\',
\'operator\' => \'NOT IN\',
\'terms\' => $hide
)
)
);
$fp_query = new WP_Query( $args ); ?>
<ul class="thumbnails">
<?php
$thumbnail_span = "span4";
if( $fp_query->have_posts() ) : while( $fp_query->have_posts() ) : $fp_query->the_post(); ?>
... Typical Formatting Follows ...
... Posts without featured images should have been excluded but "sticky" posts seem to persist