Skip to content

Instantly share code, notes, and snippets.

@djrmom
Last active January 10, 2019 15:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save djrmom/48b02bfafcf652b1cd8fdd966bd78af9 to your computer and use it in GitHub Desktop.
Save djrmom/48b02bfafcf652b1cd8fdd966bd78af9 to your computer and use it in GitHub Desktop.
facetwp fix main query when using WP GDPR Compliance plugin
<?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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment