-
AuthorPosts
-
December 10, 2019 at 3:46 pm #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,
MarcDecember 12, 2019 at 5:03 am #1165050Hey 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,
IsmaelDecember 12, 2019 at 10:07 am #1165141I 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”.December 12, 2019 at 11:49 am #1165164Hi,
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,
IsmaelDecember 13, 2019 at 6:13 pm #1165593Preferably, 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.
December 16, 2019 at 4:18 am #1166223Hi,
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,
IsmaelDecember 16, 2019 at 5:04 pm #1166501This does blend in the desired layer but the layer doesn’t disappear when accepting cookies or when revisiting with already accepted cookies.
December 17, 2019 at 7:48 am #1166742Hi,
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,
IsmaelDecember 22, 2019 at 4:57 pm #1168575Thank you for this advice.
The ticket can then be closed now.December 22, 2019 at 7:26 pm #1168598Hi,
I’m glad this was resolved. If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon -
AuthorPosts
- The topic ‘Make cookie consent message bar mandatory on first page load’ is closed to new replies.