FacetWP – ignore archive query when using a shortcode template

mgibbs189

{{gist file=”functions.php” lang=”php”}}
<?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 );
}
});
{{/gist}}