Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #5603
    crhrtt
    Participant

    Hi guys, nice and easy plugin!

    But please help to hide notice message on index page…

    Custom css doesn’t work (display:none) – it is assigned via .js?

    I am newbie… can you please let me know what to add to remove from index page showing up? Thanks a lot in advance

    #5617
    Bartosz
    Keymaster

    You can use cn_cookie_notice_output filter that’s responsible for the notice output.

    Add this to funtions.php in your theme:

    function custom_cn_cookie_notice_output($output) {
    	if (is_front_page()) { // or is_home() if your home page displays blog posts, not static page
    		$output = '';
    	}
    	return $output;
    }
    add_filter('cn_cookie_notice_output', 'custom_cn_cookie_notice_output');
    #31233
    saowp
    Participant

    Hullo,

    I tried this solution. It does hide the cookie notice on the specified page. However, if script blocking code and “on scroll” is enabled in the plugin settings, the cookies are automatically accepted / set on scroll. This presents a problem, for eg if I want to disable the notice on the privacy policy page so that visitors can read the entire page (which will require scrolling).

    Is there a way to additionally disable the “on scroll” for a particular page?

    Thanks

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.