FacetWP – prevent EDD wish list query

mgibbs189

{{gist file=”test.php” lang=”php”}}
<?php

// Todo: change “edd_wish_list” to the correct post type
function fwp_ignore_edd_wishlist_query( $is_main_query, $query ) {
if ( isset( $query->query_vars[‘post_type’] && ‘edd_wish_list’ == $query->query_vars[‘post_type’] ) ) {
$is_main_query = false; // ignore the EDD Wish List query
}
return $is_main_query;
}
add_filter( ‘facetwp_is_main_query’, ‘fwp_ignore_edd_wishlist_query’, 10, 2 );
{{/gist}}