How to Display WordPress Cookie Notice Without any Plugins
access_time
hourglass_empty
person_outline

How to Display WordPress Cookie Notice Without any Plugins

In this article, we will show you how to display the WordPress cookie notice without using any plugins. Let’s check it out!

Why Do We Need a Cookie Notice?

Since cookies collect users’ information and store them for a certain period of time, disclosing the use of cookies on your website is required by the EU Cookie Law. It’s a European Union directive that demands that any website gets consent from their visitors about the use of their data.

It doesn’t matter whether your website is based in Europe, chances are that EU visitors are still visiting it, therefore becoming a subject to the EU Cookie Laws.

Besides, adding a cookie notice for your WordPress website doesn’t cost a dime and is easy to implement!

How to Display WordPress Cookie Notice Without a Plugin

Adding unnecessary plugins to your WordPress site may slow down. So, it’d be wise to limit plugin installations and tweaking everything manually, if possible.

To display WordPress cookie notice, follow these simple steps:

  1. Generate cookie notice code by visiting WebsitePolicies.
  2. Head to Configuration wizard section and personalize a cookie notice template by adjusting its position, layout, color, and its custom text.Adjusting a WordPress cookie notice template in WebsitePolicies
  3. You can preview the template you’re creating using the Click to preview option.
  4. Once you’re done, press Copy code.Copying the WordPress cookie notice code in WebsitePolicies
  5. Log in to your WordPress dashboard and navigate to Appearance -> Theme Editor.
  6. Locate header.php file under Theme Files.
  7. Open the file and paste the code under the <head> tag.Pasting WordPress cookie notice code to header.php file
  8. Click on Update File to save your changes.

If you to check if your settings are live, simply visit your website. Make sure your cookie notice is showing and works properly.

Note: The cookie generator website will ask you to link your own cookie/privacy policy. If you don’t have one already, you can generate it for free.

Conclusion

There you have it! Your website now complies with the EU Cookie Laws, and you’ve learned how to display WordPress Cookie Notice by merely pasting the generated code. Here’s a quick recap:

  1. Generate a free cookie notice code from WebsitePolicies.
  2. Copy-paste the code to your header.php file on WordPress.

That was pretty easy, right? Good luck!

The Author

Author

Gediminas B. / @gedziuzzz

Gediminas was a passionate content writer and SEO geek at Hostinger. He started his journey at customer support and aims to use his gathered knowledge to create the most epic content the world has ever seen. From WordPress to server management, there's no topic he can't cover! He also likes cats.

Related tutorials

Author

Mike V Among Lions Reply

March 15, 2019

This is fantastic. Thank you very much guys! Great work!!!

Author

Juan Jesús Reply

August 02, 2019

Hello! I saw a lot of services talking about a cookie consent management system, is it neccesary ?

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

Become a part of Hostinger now!

More in WordPress
How to Automate WordPress Backups to Dropbox using UpdraftPlus Plugin

Close