facetwp template main query

<?php
/** detect only a template query or a WP_Query with facetwp => true **/
 
add_filter( 'facetwp_is_main_query', function( $is_main_query, $query ) {
	if ( 'listings' == FWP()->helper->get_uri() && true !== $query->get( 'facetwp' ) ) {
		return false;
	}
	return $is_main_query;
}, 10, 2 );