Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1164465

    Hello together,

    I am using the cookie consent message bar and need to set it up GDPR compliant.
    Therefore, I would like to make it (not the modal popup window) mandatory on the first page load, so users can’t browse the website without selecting one or the other option.
    So far, I have checked all options within “Theme Options” -> “Privacy and Cookies” but it seems I can only select the modal popup window to fulfill the desired function.
    Is there a way to do so for the cookie consent bar as well?

    Best regards,
    Marc

    #1165050

    Hey Marc,

    Thank you for the inquiry.

    Do you want to keep the consent bar active even after the user accepted it? There is no option for it by default. What you can do is remove all buttons in the consent bar and notify users that by continuing to browse the site, they are by that means automatically consenting to the cookies. Why do you have to make the consent bar mandatory? It will probably be tiresome for a lot of users if they have to acknowledge the consent bar every time they visit the site.

    Best regards,
    Ismael

    #1165141

    I don’t think I’ve expressed myself well enough.
    The cookie consent message bar can disappear just like it does now but when a user visits the website the first time, he should be prompted with the cookie consent message bar and shouldn’t be able to browse the website without first chosing which cookies he wants to allow.
    That was meant by “mandatory”.

    #1165164

    Hi,

    Thank you for the clarification.

    How would you like to prevent the users from browsing the site on initial load? There are many options such as removal of the main menu, prevent user from scrolling or by keeping the whole site hidden until the cookies are accepted. Which one do you prefer?

    Best regards,
    Ismael

    #1165593

    Preferably, I would want to overlay the website (except for the cookie consent message bar) with a dark layer just as it happens when you select the modal popup window to appear on page load.

    #1166223

    Hi,

    Thank you for following up.

    You can use this css code to add an overlay above the content while the cookies are not yet accepted.

    .av-cookies-user-needs-accept-button body #wrap_all::before {
    	content: '';
    	display: block;
    	z-index: 502;
    	width: 100%;
    	height: 100vh;
    	background: rgba(0,0,0,.8);
    	position: fixed;
    	top: 0;
    	left: 0;
    }

    Best regards,
    Ismael

    #1166501

    This does blend in the desired layer but the layer doesn’t disappear when accepting cookies or when revisiting with already accepted cookies.

    #1166742

    Hi,

    Sorry about that. Please remove the css code and replace it with this.

    .cookie-overlay-mod {
    	display: block;
    	z-index: 502;
    	width: 100%;
    	height: 100vh;
    	background: rgba(0,0,0,.8);
    	position: fixed;
    	top: 0;
    	left: 0;
    }
    

    Then add this script in the functions.php file to render a content overlay when the consent bar is not yet hidden.

    
    function ava_custom_privacy_overlay(){
    	?>
    	<script>
    	(function($) {
    		$(document).ready(function() {
    			var consent = $('.avia-cookie-consent');
    
    			if(!consent.is('.cookiebar-hidden')) {
    				$('<div class="cookie-overlay-mod"></div>').appendTo('#wrap_all');
    			}
    		});
    	})(jQuery);
    	</script>
    	<?php
    }
    add_action('wp_footer', 'ava_custom_privacy_overlay', 99);
    

    Best regards,
    Ismael

    #1168575

    Thank you for this advice.
    The ticket can then be closed now.

    #1168598

    Hi,

    I’m glad this was resolved. If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Make cookie consent message bar mandatory on first page load’ is closed to new replies.