Support » Plugin: Cookie Notice for GDPR & CCPA » Disable for Mobile

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author dFactory

    (@dfactory)

    Yes, of course. With a small piece of code:

    function custom_cn_cookie_notice_output( $output ) {
    	if ( wp_is_mobile() ) {
    		$output = '';
    	}
    	return $output;
    }
    
    add_filter( 'cn_cookie_notice_output', 'custom_cn_cookie_notice_output' );

    Regards,
    Bartosz / dfactory team

    espace69

    (@espace69)

    Yeahhh !!

    Thanks you very much 🙂

    Cheers !

    Not working in latest version of WordPress.

    Plugin Author dFactory

    (@dfactory)

    @horrormovies.gr, nothing has changed in WP or the plugin regarding this thread.

    Using wp_is_mobile() in front end output usually causes trouble with all kind of Cache-Plugins.

    The site of @horrormoviesgr uses WP Rocket, probably that’s the reason here.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Disable for Mobile’ is closed to new replies.