Last active
April 19, 2018 16:21
-
-
Save djrmom/d35379a6ba014a3650a0157bd9c4281f to your computer and use it in GitHub Desktop.
facetwp check main query with uri
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'facetwp_is_main_query', function( $is_main_query, $query ) { | |
if ( 'residents' == FWP()->helper->get_uri() && 'resident' != $query->get( 'post_type' ) ) { | |
return false; | |
} | |
return $is_main_query; | |
}, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment