You can query for posts based on their metadata using a Meta Query.
For instance, WordPress stores the featured image using the
_thumbnail_id meta key. To display the most recent posts that have a featured image, use:
You can also sort resorts by meta keys. See the tutorial on displaying popular posts by share count as an example.
You can also find posts that have a specific value in their meta key. To display every page using the “full-width.php” page template, use:
[display-posts post_type="page" meta_key="_wp_page_template" meta_value="full-width.php"]