How to add a cookie consent in WordPress without a plugin

52

You can add cookie consent in WordPress website with or without a plugin. In this guide, I will explain how this can be done easily and quickly without a plugin.

Almost every one of you saw this message: “This website uses cookies to ensure you get the best experience on our website. Allow cookie?”. Under GDPR and EU Cookie Law, this message must necessarily be if the website collects information through cookies files.

Video tutorial at the bottom of this page.

How to add a cookie consent in WordPress?

This way is suitable for almost any website. Not only for WordPress.

To get started, go to the cookie consent message settings page. https://cookieconsent.osano.com/download/

Choose the position of the message location.

1. Position - How to add a cookie consent in WordPress

Choose a banner layout.

2. Layout

Choose a color theme or create your own.

3. Color Palette

Add the link to your own cookie consent policy.

4. Learn more link

Choose a compliance type.

5. Compliance type

Use the default message text or replace it with your own.

6. Custom text

Copy the resulting code and paste it in before the </head> tag on the pages of your website. For WordPress website, it is enough to add the code to the header.php file in your theme.

7. Code - How to add a cookie consent in WordPress

Go to “Appearance” – “Theme Editor” – Choose “header.php” file – Add the code before the </head> tag.

Video Tutorial

Background photo by freepik.com

June 6, 2019

One Reply to “How to add a cookie consent in WordPress without a plugin”

  • Indi Buckner says:

    Hi,

    I have added cookie consent by a simple plugin called seers cookie consent plugin & they have very user friendly features