Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #962800

    Is there a way not to show the cookie consent message at all if somebody has cookies completely disabled in their browser? The way it works now is that the message is displayed on each page even if it was accepted before (which is obvious because the cookie cannot be stored).

    Is there a way to check if cookies are disabled in the browser and if so, just don’t display the cookie consent message?

    Thank you!

    #963268

    Hey essjb,

    Duplicate post – closed it

    Best regards,
    Günter

    #964566

    Hi,

    Please add following code to bottom of Functions.php file in Appearance > Editor

    //-------------------------------
    // Hide Cookie consent when cookies are disabled on browser
    //-------------------------------
    
    function av_cookie_disabled(){
    ?>
    <script>
    	jQuery(window).load(function(){
        	if (! navigator.cookieEnabled){ 
            	jQuery('.avia-cookie-consent').addClass('cookiebar-hidden');
            }
    	});
    </script>
    <?php
    }
    add_action('wp_footer', 'av_cookie_disabled');

    I will inform our devs regarding the issue :)

    Cheers!
    Yigit

    #964574

    Thank you, Yigit. Unfortunately this doesn’t seem to work though. I tried it on several sites and with different browsers but it’s still the same issue. I deleted the site cache and browser cache before each test, so that cannot be the problem either.

    I entered one of my current child functions.php files into the private content field, so that you can check if there might be.a conflict somewhere?

    Thanks!

    #964955

    Hi,

    Not sure why it did not worked on your end, i tested it on my localhost and works fine.

    Our devs fixed this issue and it will be included in Enfold 4.4.1 :)

    Best regards,
    Yigit

    #964959

    Thank you, Yigit. That’s even better since there won’t be a need to edit all functions.php files manually and it’s not an urgent issue at all.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Cookie Consent Message & Disabled Cookies’ is closed to new replies.