facetwp always ignore archive query

djrmom

{{gist file=”custom-hooks.php” lang=”php”}}
<?php
/** always ignore archive query as main query for facet **/
add_filter( ‘facetwp_is_main_query’, function( $is_main_query, $query ) {
if ( $query->is_archive() && $query->is_main_query() ) {
$is_main_query = false;
}
return $is_main_query;
}, 10, 2 );
{{/gist}}