Last active
October 7, 2020 15:37
-
-
Save mgibbs189/76c1b3cc129315490fd46016dd85370e to your computer and use it in GitHub Desktop.
FacetWP - 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( 'pre_get_posts', function( $query ) { | |
if ( $query->is_post_type_archive( 'reviews' ) || 'ct_template' == $query->get( 'post_type' ) ) { | |
$query->set( 'facetwp', false ); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment