facetwp listings template

djrmom

{{gist file=”custom-hooks.php” lang=”php”}}
<?php
/** add ‘facetwp’ => true to the listing facetwp template query args **/

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 );
{{/gist}}