CookieFrameDocs

WordPress Integration

CookieFrame WordPress Plugin — Free Cookie Consent

The CookieFrame WordPress plugin adds a cookie consent banner to your site with zero coding. It automatically injects the widget script, integrates with the WordPress Consent API, and provides shortcodes for cookie preference links.

Prerequisites

Before you begin, make sure you have:

  • WordPress 6.0 or later
  • PHP 7.4 or later
  • Admin access to your WordPress site

You do not need a CookieFrame account before installing — you can create one directly from the plugin.

Installation

From WordPress Plugin Directory

  1. In your WordPress admin, go to Plugins > Add New
  2. Search for "CookieFrame"
  3. Click Install Now, then Activate

Manual Upload

  1. Download the plugin zip file
  2. In your WordPress admin, go to Plugins > Add New > Upload Plugin
  3. Select the zip file and click Install Now
  4. Click Activate Plugin

Connecting Your Site

After activation, go to Settings > CookieFrame. You have two ways to connect:

Option A: Create a New Account

If you're new to CookieFrame:

  1. Under New to CookieFrame?, fill in your name and email — your site URL is pre-filled automatically
  2. Click Create Account & Connect
  3. Your domain is created and connected instantly
  4. Check your email to verify your account

Option B: Use an Existing Domain ID

If you already have a CookieFrame account:

  1. Log in to your CookieFrame Dashboard
  2. Select your domain and find your 8-character Domain ID in Settings > Integration
  3. Enter the Domain ID in the plugin settings
  4. Click Connect

Finding your Domain ID in the CookieFrame dashboard

Then paste it in the plugin settings page:

CookieFrame WordPress plugin setup — enter your Domain ID

Once connected, the consent banner is live on your site.


Settings

Script Position

Choose where the widget script is injected:

PositionWhen to Use
Head (default)Recommended. Loads earliest, ensures consent is established before other scripts.
FooterUse if you have specific performance requirements or conflicts with other head scripts.

Enable/Disable Banner

Toggle the consent banner on or off without disconnecting your domain. Useful for testing or temporary maintenance.

Page Exclusions

Exclude specific pages or posts from showing the consent banner. Search for pages by title in the exclusion field. Useful for:

  • Internal-only pages
  • Landing pages with special requirements
  • Pages that don't use cookies

CookieFrame WordPress plugin settings


Dashboard Widget

After connecting, a CookieFrame widget appears on your WordPress dashboard showing:

  • Status badges — banner status (Active/Disabled) and installation status (Connected/Not installed)
  • Compliance Health — your compliance score out of 100 with a color-coded bar
  • Stats grid — cookies found, categories, total consents, and last scan date
  • Consent Performance — consent rate, accept all vs reject all breakdown over the last 30 days

CookieFrame dashboard widget


Shortcodes

CookieFrame provides two shortcodes for adding consent links anywhere on your site:

[cookieframe-preferences]

Renders a link that opens the cookie preferences panel. Use this in your footer, privacy page, or anywhere visitors should be able to manage their choices.

Attributes:

AttributeDefaultDescription
text"Cookie Settings"Link text
classCSS class(es) to add
idHTML id attribute

Examples:

[cookieframe-preferences text="Manage Cookies" class="footer-link"]
[cookieframe-preferences text="Cookie Preferences" id="cookie-prefs"]
[cookieframe-do-not-sell]

Renders a "Do Not Sell My Personal Information" link for CCPA compliance.

Attributes:

AttributeDefaultDescription
text"Do Not Sell My Personal Information"Link text
classCSS class(es) to add
idHTML id attribute

The "Do Not Sell" link is required by CCPA for California visitors. Place it in your site footer alongside your privacy policy link.


CookieFrame integrates with the WP Consent API standard. When the WP Consent API plugin is active, CookieFrame automatically:

  • Registers as a consent provider
  • Broadcasts consent decisions to WordPress
  • Maps CookieFrame categories to WP Consent API categories

Category Mapping:

CookieFrameWP Consent API
Necessaryfunctional (always allowed)
Preferencespreferences
Analyticsstatistics, statistics-anonymous
Marketingmarketing

This means other WordPress plugins that support the WP Consent API (analytics, chat widgets, advertising plugins) will automatically respect your visitors' consent choices.


Caching Plugins

CookieFrame works with all WordPress caching plugins (WP Super Cache, W3 Total Cache, LiteSpeed Cache, WP Rocket, etc.). The script tag is injected directly into the page HTML via wp_enqueue_script(), so it's included in cached pages.

After activating or changing CookieFrame settings, clear your cache to ensure the updated script tag is served.


CookieFrame includes built-in support for Google Consent Mode v2. When enabled in your CookieFrame Dashboard, the widget automatically updates Google consent signals based on visitor choices.

For advanced setups with Google Tag Manager, see the GTM integration guide.


Customizing the Banner

All banner customization (design, colors, layout, text, position) is done in the CookieFrame Dashboard under Design. Changes are reflected on your WordPress site automatically — no plugin update needed.

Cookie banner design customization in CookieFrame dashboard

For details on design options, see the Design guide.


Troubleshooting

  1. Make sure the plugin is connected (Settings > CookieFrame shows a green "Connected" badge)
  2. Make sure the banner is enabled (not toggled off)
  3. Clear your browser cache and any caching plugin cache
  4. Check that the page isn't in the exclusion list
  5. Open browser DevTools console and look for errors containing "CookieFrame"
  1. Check your design settings in the CookieFrame Dashboard
  2. Your theme's CSS may conflict — test with a default theme (e.g., Twenty Twenty-Five)
  3. Try clearing your cache

"Domain ID not found" error

  1. Verify the Domain ID is exactly 8 characters
  2. Make sure your domain is active in the CookieFrame Dashboard
  3. Check that the domain name matches your WordPress site URL

Stats not loading on settings page

  1. This requires an active internet connection from your server
  2. Check that your hosting provider doesn't block outgoing HTTP requests
  3. Stats are cached for 60 seconds — wait and refresh

Uninstalling

When you deactivate the plugin, your settings are preserved so you can reactivate later without reconfiguring.

When you delete the plugin (via Plugins > Delete), all CookieFrame options are removed from your WordPress database. Your CookieFrame account and data on the CookieFrame platform are not affected.


Need Help?