Home > Docs > How to Add a Cookie Settings Link to Your WordPress Footer

How to Add a Cookie Settings Link to Your WordPress Footer

Last updated on June 1, 2026

This guide explains how to add a “Cookie Settings” link to the footer of your WordPress site, allowing users to revisit and update their cookie consent preferences at any time.

Overview

WebToffee’s GDPR Cookie Consent plugin provides a built-in “Revisit Consent” button that reopens the cookie settings modal. You can wire a custom footer link to trigger this button programmatically using a small HTML snippet and optional CSS styling.

Prerequisites

  • WebToffee GDPR Cookie Consent plugin installed and active
  • Access to your theme’s footer.php file or the WordPress widget area
  • Access to Appearance > Customize > Additional CSS or your theme’s stylesheet

Place the following anchor tag in your footer. It intercepts the click event and programmatically triggers the WebToffee consent modal by simulating a click on the plugin’s built-in .wcc-btn-revisit button.

You can insert this snippet in either of the following locations:

  • footer.php — Open your theme’s footer.php file and paste the code in the appropriate location within the footer markup.
  • WordPress Widget — Navigate to Appearance > Widgets, add a Custom HTML widget to your footer widget area, and paste the code there.

Add the following CSS to control the appearance of the link. You can customize the color values to match your site’s branding.

Add this CSS in one of the following locations:

  • Appearance > Customize > Additional CSS — Suitable for quick changes without editing theme files.
  • Theme stylesheet (style.css) — Suitable for permanent customizations in a child theme.

After adding the HTML and CSS:

  1. Visit your site’s frontend and scroll to the footer.
  2. Click the Cookie Settings link.
  3. Verify that the WebToffee consent modal opens correctly.
  4. Confirm that changes made through the modal are saved as expected.