How to add a GDPR cookie banner for WordPress

How to add a cookie banner on your WordPress website
How to add a cookie banner on your WordPress website

So that here we will show you how to implement cookie consent banner on your WordPress website without using any plugins. We will simply add a piece of code to accomplish that.

Step 1: Visit Osano website and click on “Download Open Source “.

Step 2: Click “Start Coding” to customize cookie consent notice.

Step 3: Select “Position” then click on the desired available options to show cookie banner on your website such as at top or bottom.

Step 4: Select your desired “Layout”, such as block or classic.

Step 5: Under “Palette” choose a color theme or create your own.

Step 6: Provide a link to your cookie policy page.

Step 7: Under “Compliance type” select “Just tell users that we use cookies”.

Step 8: Optionally, you can customize the text of the cookie banner.

Step 9: Download and install “Insert Headers and Footers” plugin from WordPress repository. After successful installation activate the plugin.

If you need assistance how to download and install WordPress plugin then you can read our step by step guide on the same.

Step 10: Now “Copy HTML” to your clipboard and put this code at header section of “Insert Headers and Footers” plugin.

Step 11: Press “Copy Code” and put this code at body section of “Insert Headers and Footers” plugin.

Click “Save” button. Now you have successfully integrate cookie consent notice banner on your WordPress website.

Step 12: Visit your WordPress website and you will see the cookie notice being displayed.

Conclusion

You have learned number of options for how and where to display your cookie consent notices on the WordPress website without using plugins.

However, you need to make sure that it is displayed in a prominent way. Your website now complies with the “European Union Cookie Law” and you became more comfortable with editing WordPress.

There is no need to install a plugin if the same functionality can be achieved by adding a piece of code.

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

By Sunil Pradhan

Hi there 👋 I am a front-end developer passionate about cutting-edge, semantic, pixel-perfect design. Writing helps me to understand things better.

1 comment

  1. Thanks for sharing this article. It helped me to add cookie banner to my WordPress site. This solution is more quick and I even do not need to install one more plugin for my WordPress site.

Leave a comment

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

Exit mobile version