By default, the GDPR Cookie Consent plugin preserves the cookie consent for a duration of 365 days. But, it is likely that, you may want to modify this default behavior. To do that, simply add the below given code snippet into the functions.php of the active child theme.
- Go to Appearance > Theme editor > functions.php
- Add the below given code snippet.
Adding the above code snippet will ask the user for consent within a duration of every 30 days. You can replace the value 30 with the required number of days within the code to repeat the cookie consent within that time interval.
Marcio
October 2, 2021
Hello!
If i set the cookie duration to 0, it will appear for everyone that already agreed with cookie consent before?
I need to show the cookie bar again to everyone, like nobody has accept before, because i used the button “Accept” instead of the button “Accept All” and it resulted that plugin Monster Insights got blocked.
Mark
October 5, 2021
Hi Marcio,
Greeting from Webtoffee!
If you are using the premium version of the plugin, please use the renew consent option under the GDPR Cookie Consent > Settings > Advanced tab to reset consent for all users. This option is not available in the free version.
Ben
April 20, 2021
Hi Shesna,
My colleague is keen to have the popup appear every time the user visits our website in the EU, I don’t suppose you know the current legal requirement for the duration of consent? A year seems fairly long but then every time seems REALLY too often!
Thanks
Ben
Mark
April 20, 2021
Hi Ben,
Sorry, but we do not have any recommendations regarding this.