Thank you @dfactory!
Someone helped me create the following MU plugin (In case anyone else is interested!):
File name: disable-cookie-notice.php
<?php
/**
* Plugin Name: Disable Cookie Notice
* Description: Hides the cookie notice on specific page IDs for the Cookie Notice & Compliance for GDPR/CCPA plugin by Hu-manity.co
*/
function tk_cookie_output( $output ) {
if (is_page(array(123456,789012,345678) ) ) {
$output = '<div id="cookie-notice"></div>';
} else {
$output = preg_replace('/<!--(.*)-->/Uis', '', $output);
}
return $output;
}
add_filter( 'cn_cookie_notice_output', 'tk_cookie_output' );
?>
Note that you can insert multiple page IDs separated by a comma in this section:
if (is_page(array(123456,789012,345678) ) ) {
Or an individual page ID as follows:
if (is_page(array(123456) ) ) {
-
This reply was modified 2 years, 7 months ago by Alex Ford.
-
This reply was modified 2 years, 7 months ago by Alex Ford.