Using the GDPR Cookie Consent plugin by WebToffee, you can make the cookie notice bar appear only to visitors of EU countries. But, if you need to display the cookies bar to countries other than the EU, the following code snippet allows you to do that.
From the WordPress dashboard, go to GDPR cookie consent > Settings > General. Then, enable the geo IP feature from the GDPR settings section as shown in the screenshot below:
After enabling the geo IP feature from the settings page, add the below code snippet with the corresponding country code in the array_push() function.
The code snippet below allows you to display the cookie message bar in Canada. Simply copy the code snippet to the active child theme’s functions.php file to achieve this.
lisa isailovic
December 8, 2021
The “Show only for EU Countries ( GeoIP )” setting is set to “On” but the cookie bar is still showing for ALL countries when I view the site in incognito mode while using a VPN and connecting through Brazil and Japan for example. The cookie bar is also showing while viewing the site in incognito mode while I’m here in the USA. Only GDPR is selected by the way. What can you suggest?
lisa isailovic
December 9, 2021
Note that the issue has been resolved.
Leanne
November 26, 2021
Hi, I just upgraded to the premium version. I wanted to have the cookies banner show for all countries at this stage but ticking “No” for “EU only” doesn’t work – I can’t see the banner. Any suggestions, is this a bug?
Mark
November 29, 2021
Hi Leanne,
Greetings from Webtoffee!
Your configuration seems to be right. It could be some other issue in the site that is causing the trouble. Refer to the instructions here and make sure that everything is in order.
If issue persists, please reach out via support.
Justin
August 18, 2021
Is there a way to have one cookie bar message display in the EU, and a different (shorter) cookie bar message display in other regions? I don’t want to turn the alert OFF outside of the EU, it just seems I’m required to have a much longer and more cumbersome message for EU visitors. Thanks.
Mark
August 25, 2021
Hi Justin,
We understand your requirement. Our plugin currently does not support multiple banner displays based on location. You only display banners in the EU locations only if the location-based exclusion options enabled.
Jorge Salgado
August 4, 2021
My comment was deleted because i asked for support? What company is this? You have afraid to tell other that this dosnt work because this or that? You must resolve customer issues just that..now i see why you have like 1 comment. What company is this?
Mark
August 4, 2021
Hi Jorge,
We can assure you that the comment is not deleted. It will be shown only when a moderator approves it.
Jorge Salgado
August 3, 2021
Your plugin just dosnt work outside Europe. In fact it deactivates the popup but it blocks everything because its still waiting for the consent. I sent an email already explaining that and I need one simple code to deactivate the plugin (do a return sor something) if its outside Europe.
Mark
August 4, 2021
Hi Jorge,
We have received your ticket and our support team is already working with you on this.
Mike
July 6, 2021
Please could you confirm if the geoIP is javascript based (on page load), or if it works on a server level? The reason I ask is because of plugins such as WP Rocket which have page caching, and I’m unsure of how compatible it is? Thanks for confirming.
Mark
July 8, 2021
Hi Mike,
It is based on javascript and will not have any issues to work with WP Rocket.