Tell visitors that your WordPress website uses cookies with a notice bar

The Cookie Notice kit in TermsFeed AutoTerms shows a bar with your cookie message and a "Close" link on every page of your WordPress website. The bar informs visitors and does not hold back any script, so every script on the page runs whether or not the visitor reads the message. Setup takes 3 steps and about 10 minutes.

The Cookie Notice bar above the header of a blog post, with the default message and a Close link

Use the Cookie Consent kit on a site that needs consent before it sets cookies, and the Cookie Notice kit only where a notice alone meets the rules. Article 5(3) of the ePrivacy Directive requires consent before a site stores non-essential cookies, such as analytics or advertising cookies, on the device of a visitor in the EU. The Cookie Notice kit does not ask a question or record an answer, so it does not collect such consent.

Question Cookie Notice kit Cookie Consent kit
What the visitor sees A bar with your message and a "Close" link A consent banner from TermsFeed Free Cookie Consent 4.2.0 with "I agree" and "I decline" buttons
Scripts before the visitor answers Every script on the page runs Under the default GDPR preference, vendor scripts outside strictly-necessary wait, and scripts outside the vendor list run
How visitors change their mind Nothing to change, because the bar does not ask a question The "Update cookies preferences" link reopens the Preferences Center

Turn on only 1 of the 2 kits, or visitors see 2 messages about cookies. Set up the Cookie Consent kit with Add a Cookie Banner to WordPress.

The Cookie Notice settings screen has no "Enabled" field, so the kit turns on only from the Compliance Kits screen.

  1. Open TermsFeed > Compliance Kits in your WordPress admin.
  2. Click the "Enable" button in the Cookie Notice box. The status changes to "Enabled" at once.
  3. Click the "Configure" button in the same box to open the "Cookie Notice" settings screen.

Save each change with the "Save Changes" button, then clear your page cache.

Field Values Default Effect
"Announcement bar position" "top", "bottom" "top" The edge of the page the bar sits at
"Announcement bar type" "static", "fixed" "static" Whether the bar scrolls with the page or stays at the edge of the window
"Disable for logged-in users" "yes", "no" "yes" Hides the bar from visitors who are logged in to WordPress
"Message" Rich text "We use cookies to ensure that we give you the best experience on our website" The text of the bar
"Message for close button" Text "Close" The text of the link that hides the bar, printed as plain text, so HTML in it shows as typed

The Cookie Notice settings screen with the Message editor and its Insert shortcode links marked, and the Save Changes button

Say which cookies your WordPress website sets and why, and link your Cookies Policy, such as https://example.com/termsfeed/cookies-policy/. The "Insert shortcode:" links under the editor add a value from General Settings, such as the company name, and "revert message to the default one" restores the default text. Without the WordPress unfiltered_html capability, the message keeps only the HTML that WordPress allows in posts, such as links and bold text. Look up each shortcode in Legal Page Shortcodes for WordPress.

A click on the "Close" link hides the bar for 7 days, with a cookie named wpautoterms-cookies-notice and the value 1. A new message does not bring the bar back sooner. On a WordPress multisite network, or with a site installed in a subdirectory, closing the bar on one site leaves it showing on the others.

"Announcement bar position" puts the bar at the top or the bottom of the page, and "Announcement bar type" decides whether it scrolls. A static bar is part of the page and scrolls away with it. A static "top" bar sits above your header, and a static "bottom" bar below your footer, where only visitors who scroll to the end see it. A fixed bar stays at the edge of the browser window and covers the content beneath it until the visitor closes it.

A bar at the bottom appears on cached and uncached pages. A bar at the top appears on cached pages only under a page cache that stores it with the page, such as WP Super Cache or Cache Enabler. "Caching plugins compatibility mode" shows it under any page cache. Read when to turn the mode on in Step 2: Turn on "Caching plugins compatibility mode" when the top bars are missing.

The bar takes the fields "Background color", "Font", "Font size", "Text color", "Links color", and "Additional CSS", which only an account with unfiltered_html saves. An empty color field and the "default" font values do not print a style, so the bar keeps the look of your WordPress theme. Find the accepted values of each field in the style fields of the notice and Endorsements kits.

Write rules for the bar and its close link in "Additional CSS". Find the class of each part of the bar in TermsFeed AutoTerms CSS Classes and Containers. Trace a color the bar ignores with Colors or Fonts Not Showing in WordPress.

Check the bar as a logged-out visitor, because "Disable for logged-in users" hides it while you are logged in.

  1. Clear your page cache, with "Caching plugins compatibility mode" on for a top bar.
  2. Close every private window, open a new one, load your WordPress website, then open Chrome DevTools.
  3. Select the Network tab, type wpautoterms.js in the filter box, reload the page, and check that the request returns 200. A page speed plugin that combines JavaScript serves the file inside its combined file, and the bar showing your message is then the check.
  4. Check that the bar shows your message at the place you chose, then click the "Close" link.
  5. Select the Application tab, open Cookies for your domain, and check that wpautoterms-cookies-notice holds the value 1.
  6. Reload the page and check that the bar stays hidden.

The bar now shows your message to every new visitor. Find the cause of a bar that does not appear or does not close in Cookie Notice Not Appearing in WordPress.