Created
February 8, 2021 14:56
-
-
Save djrmom/06f0c05b94d45afd7a719e696f85738a to your computer and use it in GitHub Desktop.
facetwp GDPR Cookie Consent compatiblity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** ignore query added by GDPR Cookie Consent **/ | |
add_filter( 'facetwp_is_main_query', function( $is_main_query, $query ) { | |
if ( 'cookielawinfo' == $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