How to Add a Cookie Consent Pop-Up to Your Website


The EU cookie policy requires all websites, that potentially serve end users located in the European Union, to have a clearly visible cookie consent banner placed on them. It’s a bit of a bureaucratic hassle but nothing to be concerned about.

What Is It?

The ePrivacy directive:

requires prior informed consent for storage of or access to information stored on a user’s terminal equipment. In other words, you must ask users if they agree to most cookies and similar technologies before the site starts to use them.

Silktide’s Cookie Consent

Fortunately, the free and open-source Cookie Consent solution makes it extremely easy to comply with this law.


Cookie Consent

All you have to do is click through the code creation wizard — the Download now button.

Step 1 — Choose a Theme

You can choose from:

  • a dark banner on a light background,
  • a light banner on a dark background,
  • and three positions: top, bottom, or corner.
Choose theme

Choose theme

Click Continue.

Step 2 — Customize Text

Next, you can either accept the default text included in the code or you can customize the text in the code so that it is in tune with the rest of your writing.

Customize text

Customize text

Click Continue.

Step 3 — Copy the Code

Use the Ctrl+C keyboard shortcut to copy the code.

Step 4 — Add the Code to header.php

Paste (Ctrl+V) the code right before the </head> tag in your theme’s header.php file.

To find it, go to WordPress Dashboard > Appearance > Editor and look for header.php in the far right column of the window.

Once you added the code to the correct place, click on the Update File button.

Step 5 — Test It

To make sure that you added the code where it should be, visit your website. If a cookie consent banner pops up, you did everything right.

Liked this post?

Subscribe to our newsletter to receive early notification of new posts and deals:
[mc4wp_form id=”45″]

Next Post »« Previous Post