WPConsent Blog

Everything you need to know about the WPConsent plugin

How to Add a Cookie Consent Banner on Your WordPress Website

How to Add a Cookie Consent Banner on Your WordPress Website 

Think about visiting your favorite website and seeing a little message pop up, asking if you’re okay with cookies. These messages are cookie consent banners, and they are like a polite way for websites to ask permission.

They are often needed because of privacy laws like GDPR in Europe or CCPA in California. These regulations protect people’s information online. They also require websites to be clear about what cookies they use and what information they collect.

If you have a WordPress website, then adding a cookie banner helps ensure compliance with privacy rules. While you might think it requires coding and technical skills, but it’s easier than that. With the right plugin like WPConsent, you can easily insert and customize a cookie banner with no coding.

In this article, we will show you how to easily add a cookie consent banner to your WordPress website.

What are Cookies?

Cookies are small files that websites put on your computer or phone browser when you visit them.

Think of them like little helpers for websites. They remember things about your visit, your login information, and other details. This way, you don’t have to log in again or change website preferences each time you visit a site.

Websites use cookies to make things easier for you. They also use them to learn about what people do on their site. For instance, some are needed to make the website work right. While others are used to see which parts of the site are popular or help show you ads that might interest you.

Why Add a Cookie Consent Banner in WordPress?

So, why do you need a cookie banner on your WordPress site? There are a few good reasons.

First, it’s about following the law like GDPR and CCPA, which often mean you must have a banner on your WordPress site. If you don’t, then you could get into a lot of trouble. This could mean fines or other legal problems.

For example, GDPR sets a maximum fine of €20 million or 4% of annual global turnover (whichever is higher) if a website fails to meet its requirements.

Second, it builds trust. When you are open about cookies, people feel safer on your site. This can make visitors more likely to come back and help build trust with your brand.

Here’s an example of how a cookie consent banner looks like on WPBeginner. It’s a small popup that appears at the bottom of the screen.

Cookie consent banner preview

Finally, it’s just the right thing to do. Being clear about data is a good practice. It shows you care about your visitors. Even if the laws didn’t exist, being upfront is a good way to run a website.

That said, let’s look at a simple way of adding a cookie consent banner in WordPress.

Adding Cookie Consent Banner in WordPress

Adding a cookie banner might seem hard, but with WPConsent, it’s easier than ever. It is the best WordPress consent management plugin and makes it super easy to add cookie banners to your site.

Besides that, you can automatically scan your site for services that are using cookies, manage them from a single place, block third party scripts, and much more.

For this tutorial, we will use the WPConsent Pro version because it offers a modal banner layout, automatic cookie configuration, consent logs, and more. There is also a WPConsent Lite version which you can use for free and add a consent banner on your website.

To get started, you’ll need to install and activate the WPConsent plugin. If you need help, then please see this guide on how to install a WordPress plugin.

Upon activation, the WPConsent setup wizard will open. You can click the ‘Let’s Get Started’ button and follow the onscreen instructions to complete the setup process.

WPConsent setup wizard

After that, you will need to head to WPConsent » Settings from the WordPress admin panel.

From here, go to the ‘Cookie Configuration’ section and ensure the Consent Banner toggle is active.

Enable consent banner

If you scroll down, then you’ll also see the Cookie Categories.

WPConsent will group cookies into 3 main categories, which includes essential, statistics, and marketing. You edit each of these categories by clicking the pencil icon, and also add more by clicking the ‘Add New Category’ link.

Cookie categories

For most WordPress websites, the default settings will work perfectly.

That said, let’s see how you can edit the cookie consent banner by using WPConsent.

Customize Your Cookie Consent Banner

Next, you will need to go to WPConsent » Banner Design to customize the appearance of your cookie banner.

WPConsent offers 3 layouts to choose from. You can pick a long banner, floating banner, or a modal banner. There are also options to choose the position of the banner if you select the long or floating banners. You can select whether it should appear at the top or bottom of your website.

Edit cookie banner layout

If you select the Modal Banner option, then it will appear as a popup window. This is a great alternative for getting consent from users if you don’t want to show a sticky banner on your website.

Next, you can switch to the ‘Style’ tab at the top. Here, you’ll find options to change the background color, text color, button styling, and button color for your cookie consent banner. This allows you to fully customize the banner according to your brand.

Edit the style settings

After that, you can head to the ‘Content’ tab and edit the text that will appear in the banner.

By default, WPConsent will already provide a text that you can use for your website. Simply modify the existing text or add your own under the Message area.

Edit cookie banner content

If you scroll down, then you’ll find more options to edit the content of the banner.

For instance, there are options to change the button text, rearrange their order, and also select which buttons to display. You can also add a logo or icon, and enable the option to show ‘Powered by WPConsent’ in the banner.

Change buttons and logo icon

When you’re done, simply scroll to the top and click the ‘Save’ button.

The best part is that you can click the ‘Preview’ button and see how your banner looks like. This way, you can quickly make changes and adjust the appearance of the banner.

Save and preview banner

You’ve now successfully created a cookie consent banner in WordPress.

You can visit your website to see it in action. Here’s how it looks like on our website.

Cookie banner on WPConsent

Users can simply click the Accept or Reject button to accept cookies.

They can also click the ‘Preferences’ button and choose which type of cookies to allows.

Cookie preferences

That’s it! You can easily create and customize cookie consent popups in WordPress using WPConsent.

Give WPConsent a try today and make your site compliant with privacy laws. Plus, you also get automatic script blocking and a compressive cookie management solution.

If you liked this article, then please follow us on X (formerly known as Twitter). You can also leave a comment below if you need any assistance.

Add A Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.


Popular Resources

Get free tips and resources right in your inbox, along with 500+ others

Follow Us