Created
September 10, 2020 21:54
-
-
Save djrmom/f61b54f852cbbff36240fdc59825a6f2 to your computer and use it in GitHub Desktop.
facetwp force template query
This file contains 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 'facetwp' => true to *ALL* facetwp template query args **/ | |
add_filter( 'facetwp_is_main_query', function( $is_main_query, $query ) { | |
if ( true !== $query->get( 'facetwp', false ) ) { | |
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