Created
October 10, 2018 14:36
-
-
Save mgibbs189/94815aab014bfe4f2b7586e53dba9e11 to your computer and use it in GitHub Desktop.
Ignore archive query when using a shortcode template
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 to your (child) theme's functions.php | |
add_filter( 'facetwp_is_main_query', function( $is_main_query, $query ) { | |
return ( $query->is_post_type_archive( 'petite_annonce' ) ) ? false : $is_main_query; | |
}, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment