Query sticky posts with thumbnails
I need to display max 5 latest sticky posts that have a thumbnail. And I need to have accurate counting of the displayed posts. I’ve tried to exclude sticky posts without a thumbnail with meta_query, but with no luck. $sticky = get_option(‘sticky_posts’); if (empty($sticky)) { return; } $counter = 1; $r = new WP_Query(array( ‘posts_per_page’ … Read more