Summarize this article with
Ensuring your WordPress website complies with privacy laws such as GDPR and CCPA is crucial. Adding a cookie banner is one of the best ways to stay compliant while maintaining user trust. In this guide, we’ll walk you through installing a cookie consent banner on your WordPress site using a simple and effective method.
Why you need a cookie consent banner
A cookie popup informs visitors about your site’s data collection practices and allows them to accept or manage cookies. It’s essential for data privacy compliance and helps build transparency with your audience.
Read also: Wix cookie banner and Webflow cookie consent and Squarespace cookie banner and Bigccommerce cookie popup
Best ways to add a WordPress cookie banner
There are two common ways to add a WordPress cookie notification to your website:
- Using a cookie plugin (recommended for simplicity)
- Manual installation (for advanced users comfortable editing code)
We’ll walk you through the easier, recommended option so you don’t have to edit your theme functions.php.

How to add a cookie consent banner using WPCode plugin
If you prefer a straightforward way to add a cookie consent banner, use a WordPress plugin. In this tutorial we use the WPcode plugin.
What is a WordPress plugin?
A WordPress plugin is a software add-on that extends the functionality of your WordPress website. It allows you to add features like cookie banners, contact forms, SEO tools, and more without coding. Plugins are easy to install, making WordPress highly customizable and scalable.
Step 1: Install and activate the WPCode Plugin
- Log in to your WordPress Dashboard.
- Go to Plugins > Add New
- Search for "WPCode."
- Click Install Now and Activate

In your WordPress dashboard, go to Plugins, then Add a new Plugin.

In Plugins, search for wpcode. Click Install Now and Activate.
Step 2: Grab the Ketch Smart Tag
- Sign up for Ketch Free or log into your Ketch dashboard
- Navigate to the Properties screen
- Select the right property and click on Export Code
- Copy the Website Smart Tag code provided

On the Properties screen, select the right property and click on Export Code.

Copy the Website Smart Tag code provided.
Step 3: Add the cookie banner code
- From the WordPress Dashboard, navigate to Code Snippets > Header & Footer
- In the Header section, paste the Ketch Smart Tag script (available from your Ketch Properties - see Step 2 above)

In your WordPress Dashboard, navigate to Code Snippets > Header & Footer.

In the Header, paste the Ketch Smart Tag script.
Step 4: Save and deploy
- Click Save Changes to implement the cookie banner on your WordPress site
- Reload your website to see your cookie banner pop up

Click Save Changes to implement the cookie banner on your WordPress site.

Reload your website to see your cookie banner pop up.
“As a fast-growing but early-stage start-up operating across 3 regions (US, UK/EU, and Australia), Ketch was the obvious choice for us. Ketch made it easy to be compliant in all 3 regions, plugged straight into our website builder, and had excellent customer support. Thanks Ketch for making cookie consent banners easy!”
- Vivienne Chan, Co-founder, Veraty
The free cookie banner and consent management you need, designed with you in mind
Growing small businesses get Ketch Free to achieve data privacy compliance at no cost, and with peace of mind.
Ketch offers a free, no-code cookie banner and consent management solution tailored for small businesses. It enables users to create customizable cookie banners that comply with privacy regulations such as GDPR and CCPA.
WordPress Cookie FAQs
Can I add a cookie banner on WordPress without a plugin?
Yes, but you’ll need to edit your theme’s functions.php file or use a custom script manually.
What is the best free cookie consent plugin for WordPress?
Many top-rated plugins offer free versions. Ketch offers its own version of a free cookie banner too. Unlike your classic free cookie consent banners, Ketch Free offers full consent management platform (CMP) functionality. It positions you for success from day one and scales effortlessly at your side as your company and website traffic grows.
Read also: What is consent management?
Tell me more about GDPR and WordPress
The General Data Protection Regulation (GDPR) is a European privacy law that affects websites worldwide if they collect data from EU residents. To comply with GDPR, WordPress site owners must disclose data collection practices, get user consent for cookies, and allow visitors to manage their preferences.
How do I add cookies notice in WordPress?
To enable a cookies popup in WordPress, install and activate the WPCode plugin from your WordPress Dashboard. Go to Code Snippets > Header & Footer, paste the Ketch Smart Tag code into the Header section, and click Save Changes.
This will display a WordPress cookie notice on your site, ensuring GDPR compliance.
How to display WordPress cookie notice without any plugins?
To display a WordPress cookie notice without plugins, manually edit your theme’s functions.php or use Appearance > Theme Editor in your WordPress Dashboard. Add the cookie consent script inside the Header section before the closing <head> tag. Save the changes to display the cookie notice on your site.






