jenny-r
1/10/2019 - 3:57 PM

facetwp fix main query when using WP GDPR Compliance plugin

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);