Question

I have a query running which prevents posts without various criteria from appearing, one of these is the necessity to have a featured image. Sticky posts however seem to end up in the query regardless. How can I achieve this?

    $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

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top