how do I add cookie notifications
Wordpress

How do I add cookie notifications to WordPress?

How do I add cookie notifications to WordPress? I show you how to copy HTML code into your WordPress site. You do not need to know how to code. Once finished, your website will be EU cookie law compliant.

If you have visitors to your website from any EU country, your website must be EU cookie law compliant.

Let’s get started.

EU member countries list

If you get visitors to your website from any of the following countries, you need a cookie consent notice on your site.

AustriaItaly
BelgiumLatvia
BulgariaLithuania
CroatiaLuxembourg
CyprusMalta
CzechiaNetherlands
DenmarkPoland
EstoniaPortugal
FinlandRomania
FranceSlovakia
GermanySlovenia
GreeceSpain
HungarySweden
IrelandUnited Kingdom

To get started, we need the code for our cookie notification. To get this, we head over to www.cookieconsent.osano.com, here is the homepage.

Cookie consent code website

Next, click on the green ‘Download’ link. Now we have this.

Download cookie consent

The code you need is on the right, first, we configure our cookie consent display.

Use the drop-down menu boxes on the left, to get your cookie consent display the way you want.

The black consent display that you see at the bottom of the above screenshot, is how it will look with the current settings. As you change the configuration, the display will change to match those changes.

The configure options allow you to change the position of the display, the layout, and the colors.

If you have a privacy policy that includes cookie use on your website, you can link to that page in the ‘learn more link’ drop-down or use the link to a ‘What are cookies?’ page.

There is an option to change compliance type, I would recommend going with the default setting, then you don’t need to add extra code.

Finally, if you want to change the default text, you can type a different message.

How to put the code into your WordPress site

I have a website that I use to do tutorials. This is the homepage.

My example website

I don’t have a cookie consent notice on this site yet, I will correct that now.

Keep the website with your code open, we will come back to that in a minute.

Let’s go to our WordPress admin page. Here is mine.

WordPress admin

Installing the headers and footers plugin

The easiest way to input the cookie code is by using a WordPress plugin called ‘Headers and footers’.

I will install that plugin next. To do that I find ‘Plugins’ on the left, on the popup menu, I select ‘add new.’

Like this.

How to install a new plugin in WordPress

After I select ‘Add New’, I come to the WordPress plugin library. To find the plugin, I type ‘Headers and footers’ into the search bar, like this.

The plugin I need is on the top-left. To install, click on the ‘Install now’ link. After a few seconds, the same link will change to ‘Activate’. Click on it once more, then you can start using the plugin.

This plugin is found in the left menu, under ‘Settings.’ Click on the ‘Headers and footers’ link.

Like this.

How to use the headers and footers plugin to add code

After I click on the link, I come to this.

Headers and footers plugin

As you can see from the above screenshot, I have two boxes. One is for code that needs to be in the ‘head’ section, the other box is for code that needs to be in the ‘body’ section.

Let’s go back to the website with our cookie code, and check what code needs to go in each box.

Copying code for cookie consent notice

The website tells us which section to put the code in. We have two sets of code that we use to activate our cookie notification. The top code goes into the ‘head’ section box, and the other code goes into the ‘body’ section box.

I have just done that, here is my WordPress admin.

Inputting code into a WordPress website

To activate the cookie notification on my website, I click on ‘Save.’

To check if my cookie notification is working, I go to any page on my website, and the notification should display along the bottom of the screen.

How do I add cookie notifications to WordPress

There is my cookie consent notice along the bottom of my site.

If you decide you want to change the configuration of your notification, go back to the cookie consent website, make your changes, and copy the new code.

Use the headers and footers plugin to input the code into your site, and save.

Conclusion

It is easy to generate a cookie consent notification for your WordPress site. Don’t get caught out. The process takes a few minutes.

Go to cookieconsent.osano.com and configure your notice. Go back to your WordPress admin, install the ‘Headers and Footers’ plugin. Paste your code into the correct boxes, and your website is compliant.

Another notification service I like to use to promote new posts is www.subscribers.com. Every time I publish a new post, I send a push notification to all my subscribers.

If you would like to learn about this service, check out my ‘How do I add push notifications to my WordPress site?‘ post.

Frequently asked questions

How do I add cookie consent in WordPress?

In my post, I share with you a website that is free to use, where you can generate a cookie consent popup for your site. Set up takes a few minutes and adding it to your website is easy.

Do I need cookie consent on my website?

If you have visitors to your site that are in the EU, then yes, you do need a cookie consent notification. If you do not offer this consent, you could be prosecuted.

Why do websites warn about cookies?

If you have visitors to your website that come from an EU country, then by law, you must inform your visitors that your site uses cookies. It is a requirement to inform and obtain consent from visitors it aims to give web users more control over their online privacy.

Comments

What service do you use to make your site cookie consent compliant?

Did you know you need to make your site compliant if you have visitors to your site from EU counties?

If you would like to ask anything, please leave your question in the comments box.

I look forward to reading your comments.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.