facetwp fix main query when using WP GDPR Compliance plugin

djrmom

{{gist file=”custom-hooks.php” lang=”php”}}
<?php
/** a query from WP GDPR Compliance plugin gets set as the
** main query, this fixes it
**/
add_filter( ‘facetwp_is_main_query’, function( $is_main_query, $query ) {
if ( ‘[wpgdprc_access_request_form]’ == $query->get(‘s’) ) {
return false;
}
return $is_main_query;
}, 10, 2);
{{/gist}}