get_posts with thumbnail only
-
I’m using get_posts with the following args:
$args=array('numberposts'=>2,'post_type'=>'post','orderby'=>'rand');
I’d like to only get posts that have a thumbnail. Is there a way to pass has_post_thumbnail as an argument? I know it’s possible to use get_option within the array and I’ve tried adding this:
'include'=>get_option('has_post_thumbnail')
which does not cause an error—but doesn’t work either. Anyone know how to pull this off?
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘get_posts with thumbnail only’ is closed to new replies.