jenny-r
1/9/2018 - 5:25 PM

facewp detect query

facewp detect query

<?php

add_filter( 'facetwp_is_main_query', function( $is_main_query, $query ) {
    if ( !in_array( 'hotel', $query->get( 'post_type' ) ) ) {
        $is_main_query = false;
    }
    return $is_main_query;
}, 10, 2 );