Back to Community

How to Fix the 'Always Enabled' Setting for Your Necessary Cookie Category

Content

One of the most common questions users have about the CookieYes plugin is how to ensure their "Necessary" cookie category is permanently enabled and cannot be toggled off by visitors. If you're finding a toggle switch on your necessary cookies instead of a locked button, this guide will explain why it happens and how to fix it.

The Problem: Necessary Category is Not "Always Enabled"

By design, the necessary cookie category should be "always enabled." This means it appears in your cookie settings as a static button that users cannot disable, which is a requirement for most privacy laws. However, many users report that after editing their cookie categories, the necessary category loses this special status and gains a toggle switch, making it look and behave like any other optional category.

Why This Happens

Based on community support threads, this issue almost always occurs when the category slug for the necessary category is changed from its default value. The plugin uses the specific slug necessary to identify which category should have the "always enabled" property. If this slug is modified—for example, to a translated term like "nezbytné" or "necessaire"—the plugin no longer recognizes it as the necessary category, and it reverts to a standard, toggle-able category.

How to Fix It: Restore the 'necessary' Slug

The solution is straightforward and confirmed to work by numerous users. You do not need to change the visible name of the category, only its underlying slug.

  1. Navigate to GDPR Cookie Consent > Cookie Category in your WordPress admin dashboard.
  2. Click Edit on your necessary cookie category (it may be named "Necessary," "Essenziell," or something similar).
  3. Locate the Category Slug field.
  4. Change the slug back to exactly: necessary
  5. Click Save to update the category.

Screenshot showing the slug field in the category editor

After saving, clear your website and browser cache, then check your site's cookie settings again. The necessary category should now appear as a static, "always enabled" button. The visible name you set for the category (e.g., "Notwendige Cookies") will remain unchanged for your visitors.

Clearing Your Cache

If the change does not appear immediately, it is likely due to caching. Be sure to:

  • Clear any server-side or plugin-based caching on your WordPress site (e.g., from WP Rocket, W3 Total Cache, or your hosting provider's cache).
  • Clear your browser's cache and cookies or test in a new incognito/private browser window.

Important Limitations

It's important to understand the plugin's limitations, as discussed in the community:

  • This method only works for one category. The free version of the plugin does not allow you to mark more than one category as "always enabled." To have multiple always-enabled categories, a premium version is required.
  • You cannot create new custom categories with the "always enabled" property; this functionality is tied specifically to the category using the necessary slug.
  • You cannot enable or disable individual cookies within a category; consent settings are applied to entire categories.

By ensuring your necessary category uses the correct slug, you can quickly resolve this common configuration issue and ensure your cookie banner remains compliant.

Related Support Threads Support