Skip to content

Instantly share code, notes, and snippets.

@unfulvio
Forked from mgibbs189/functions.php
Created February 13, 2017 13:02
Show Gist options
  • Save unfulvio/a9818930ef36df6fc59f7e54f77eeb68 to your computer and use it in GitHub Desktop.
Save unfulvio/a9818930ef36df6fc59f7e54f77eeb68 to your computer and use it in GitHub Desktop.
FacetWP - WooCommerce Memberships fix
<?php
add_filter( 'facetwp_is_main_query', function( $is_main_query, $query ) {
if ( 'wc_user_membership' == $query->get( 'post_type' ) ) {
$is_main_query = false;
}
return $is_main_query;
}, 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment