---
title: "WordPress Cookie Banner for CCPA/CPRA (2026)"
description: "Set up CCPA/CPRA opt-outs on WordPress and WooCommerce: Do Not Sell link, GPC, the WP Consent API, plugin-injected pixels, and testing your setup."
url: "https://cookiebeam.com/guides/wordpress-cookie-banner-ccpa-cpra-2026"
lang: "en"
last_updated: "2026-11-16T11:46:44.135Z"
---

# WordPress Cookie Banner for CCPA/CPRA: 2026 Setup

How to give California visitors a working Do Not Sell or Share opt-out on WordPress and WooCommerce: plugin install, GPC handling, the WP Consent API, and the marketing plugins that keep firing after an opt-out.

California's privacy law doesn't ask for an opt-in cookie banner. What it asks for catches many WordPress sites off guard: a working **opt-out of the sale and sharing** of personal information, tags that actually stop when someone opts out, and automatic handling of the **Global Privacy Control** browser signal. The CPRA amendments broadened "sharing" to cover disclosing data for cross-context behavioral advertising, even without money changing hands. That's what most ad pixels do. On WordPress, the banner itself is rarely the hard part. The hard part is marketing plugins that print pixel tags from PHP without ever asking the banner for permission.

> **Tip: TL;DR**
>
> The CCPA covers for-profit businesses operating in California whose annual gross revenue crosses a threshold set in the statute (inflation-adjusted), or that buy, sell or share the personal information of 100,000+ California consumers or households, or that earn half their revenue from selling or sharing it. If you're covered: give visitors an opt-out for sale and sharing, honor GPC without requiring a click, and make sure the opt-out actually stops the relevant tags.

**CCPA/CPRA requirements and where they live on WordPress**

| Requirement | What California expects | On WordPress |
| --- | --- | --- |
| Opt-out link | "Do Not Sell or Share My Personal Information", or the alternative "Your Privacy Choices" link, on every page | A menu or footer link, plus the consent tool's persistent link |
| Opt-out preference signals | Treat GPC as a valid opt-out of sale and sharing, with no extra click | Handled by the consent tool in the browser; plugins using the WP Consent API follow it |
| Sensitive data | A "Limit the Use of My Sensitive Personal Information" link if you use sensitive data beyond permitted purposes | Relevant for health, location or financial plugins and forms |
| Minors | Opt-in before selling or sharing data of consumers you know are under 16 | Membership or account logic; a banner can't determine age |
| Re-asking | Wait at least 12 months before asking someone who opted out to opt back in | A consent-tool setting |

## The plugin problem

Pixel plugins for Meta, Google, TikTok or Pinterest, WooCommerce marketing extensions and analytics plugins often inject their tags server-side. A consent tool can only stop those tags if the plugin either checks consent before printing the tag, or outputs the tag as inert markup the consent tool activates. The [WP Consent API](https://wordpress.org/plugins/wp-consent-api/) is the standard contract: plugins that support it call `wp_has_consent()` before adding tracking code. For every marketing plugin on your site, check whether it supports this API. If it doesn't, disable its built-in tag and load the vendor through markup or GTM that your consent tool controls.

The broader WordPress mechanics are covered in [WordPress cookie consent in 2026](https://cookiebeam.com/guides/wordpress-cookie-consent-complete-guide-2026) and, for stores, [the WooCommerce setup guide](https://cookiebeam.com/guides/woocommerce-cookie-consent-guide-2026).

## Set up CookieBeam for California visitors

### Step 1: Publish your banner first

Create the banner in CookieBeam, set up its categories, and publish it to production so the loader has a configuration to serve. See the [quickstart](https://cookiebeam.com/docs/getting-started/quickstart).

### Step 2: Install the CookieBeam plugin

Upload the CookieBeam plugin zip under _Plugins &rsaquo; Add New Plugin &rsaquo; Upload Plugin_ (it's not in the WordPress.org directory yet), activate it, and paste your banner ID under _Settings &rsaquo; CookieBeam_. The plugin prints the loader first in `<head>` and prevents common optimization plugins from deferring or combining it. If you previously pasted a CookieBeam script directly into your theme, remove it so the loader doesn't fire twice. See [the WordPress integration](https://cookiebeam.com/docs/integrations/wordpress).

### Step 3: Apply the CCPA/CPRA preset

On the banner's **Regional settings** page, add a rule from the **CCPA/CPRA** framework preset. It targets California visitors with an opt-out banner in a bar-inline layout at the bottom of the page. The preferences button reads "Do Not Sell or Share My Personal Information" and opens the US opt-out panel. Turn on the rule's **Do-Not-Sell link** option so a persistent link remains accessible after the first choice. If you serve visitors in other US privacy states, add the US Opt-Out States preset too. See [regional rules](https://cookiebeam.com/docs/configure/regional-rules).

### Step 4: Mark the tags that sell or share

Put ad pixels and data-sharing tags in the marketing category. Hardcoded scripts need inert markup (`type="text/plain"` with `data-category`) so CookieBeam can control them; see [script blocking](https://cookiebeam.com/docs/configure/blocking). Under opt-out mode, these tags run by default. Once the visitor opts out, they stop being activated. An opt-out can't unload a script that already ran on the current page.

### Step 5: Keep Consent Mode on

Leave Google Consent Mode enabled in the banner settings. It updates Google's own tags, and it drives the consent-state event that CookieBeam's vendor bridges listen to.

### Step 6: Connect the WP Consent API

With the WP Consent API plugin active, CookieBeam registers as the site's consent plugin and passes the visitor's choice to `wp_set_consent()`. The mapping reads from the Consent Mode state the banner already resolved, so regional rules and GPC are already factored in: a California visitor who opts out, or arrives with GPC active, reads as no consent for `marketing` to every plugin that checks the API.

### Step 7: Add a menu link

Add a **Cookie settings** link through _Appearance &rsaquo; Menus_ or as a custom link to `#cookiebeam-settings`. It opens the preferences panel. The rule's Do-Not-Sell link is the entry that opens the US opt-out panel, so keep both reachable.

### Step 8: Save, publish and test

Click **Save Settings**, then **Publish**. Rule changes don't reach visitors until you publish. Then run the California test below.

> **Warning: What California has actually enforced**
>
> The California Privacy Protection Agency's 2025 enforcement decisions against **Honda** and **Todd Snyder** both centered on consent-tool mechanics: an opt-out that requested more information than necessary, choices that were easier to accept than decline, and in Todd Snyder's case an opt-out that silently failed for weeks due to misconfiguration. A WordPress site that shows the right link but keeps firing pixels after an opt-out has the same exposure. Test the opt-out, not just the banner.

## Test your WordPress site like a California visitor

1. Open the site in a clean browser profile, from a California IP or with a geo-simulated preview, and confirm the opt-out banner appears.
2. Exercise the opt-out for sale and sharing, reload, and check the Network tab. Advertising pixels should stop loading.
3. In a GPC-enabled browser, confirm `navigator.globalPrivacyControl` is `true`, load the site fresh, and verify that advertising tags never fire at all, with no click required.
4. Confirm the Do-Not-Sell link is still reachable after the initial choice.
5. Repeat the opt-out test with each marketing plugin active, and view-source to look for pixels printed in the page that bypass the banner.

The [cookie banner QA checklist](https://cookiebeam.com/guides/test-cookie-banner-compliant-qa-checklist-2026) covers the same checks for EU and UK visitors.

## Frequently Asked Questions

### Is a cookie plugin enough for CCPA on WordPress?

Only if it actually stops the tags that sell or share data after an opt-out and honors GPC. Plugins that inject pixels server-side without checking consent can bypass any banner. Test with every marketing plugin active.

### What is the WP Consent API?

A WordPress plugin and standard that lets a consent tool publish the visitor's choice and lets other plugins check it with **wp_has_consent()**. Plugins that support it will follow the banner's decision, including a CCPA opt-out.

### Does WooCommerce need a Do Not Sell link?

If the store is covered by the CCPA and its pixels or integrations share customer data for cross-context behavioral advertising, yes. Most stores running Meta or Google ad pixels are in that position.

### Where should the Do Not Sell link go on WordPress?

Somewhere reachable from every page, usually the footer menu. A floating link from your consent tool covers pages that use custom templates.

## Related guides and sources

[WordPress cookie consent in 2026](https://cookiebeam.com/guides/wordpress-cookie-consent-complete-guide-2026) covers the GDPR opt-in side of the same setup. For the law, read [how to build a compliant Do Not Sell or Share link](https://cookiebeam.com/guides/do-not-sell-share-link-ccpa-guide-2026), [Global Privacy Control explained](https://cookiebeam.com/articles/gpc-global-privacy-control-explained) and [CPRA enforcement in 2025-2026](https://cookiebeam.com/articles/cpra-cppa-enforcement-2025-2026). If you serve visitors in other US privacy states, use the [US state privacy cookie banner checklist](https://cookiebeam.com/guides/us-state-privacy-cookie-banner-checklist-2026).

Primary sources: [California Attorney General CCPA page](https://oag.ca.gov/privacy/ccpa), the [California Privacy Protection Agency](https://cppa.ca.gov/) (regulations and enforcement decisions), and the [Global Privacy Control specification](https://globalprivacycontrol.org/).

This page summarizes the law as we understand it in October 2026 for website and cookie decisions. It isn't legal advice. Statutes, regulations and attorney general guidance change, so confirm the current text with counsel before relying on any threshold or date here.
