First, create a new facet named has_image.

Set its Data Source to “Post Type” (as a placeholder).

Then add the following code to your (child) theme’s functions.php file:

How to use custom PHP code?

PHP code can be added to your (child) theme's functions.php file. Alternatively, you can use the Custom Hooks add-on, or a code snippets plugin. More info

add_filter( 'facetwp_index_row', function( $params, $class ) { if ( 'has_image' == $params['facet_name'] ) { $post_id = (int) $params['post_id']; $params['facet_value'] = ''; // by default, skip this row if ( has_post_thumbnail( $post_id ) ) { $params['facet_value'] = 1; $params['facet_display_value'] = 'Yes'; } } return $params; }, 10, 2 );

Make sure to re-index afterwards. If it works correctly, your facet will contain one choice (“Yes”). Clicking that choice will narrow the listing to only post items containing a featured image.

See also