Modify Strictly Enabled Cookie Categories Using WebToffee GDPR Cookie Consent Plugin
The below code snippet allows you make any cookie category a strictly necessary category using GDPR Cookie Consent Plugin. The user can not disable the categories that are strictly necessary from the settings pop-up.
To achieve this simply add the below code snippet to the active child theme function.php and enter the name of the category in the single quotes, in lower case.
Comments (2)
Yannick Sanchez
April 28, 2020
Hi Safwana, I have a multi lingual site managed by a Polylang plugin. I added the php code and it is working well only for my english categories. Unfortunately this is not working for my French translations, which are can still editable in the front end even if they are listed in the script.
Could you please assist regarding this matter?
Yannick Sanchez
April 28, 2020
Problem resolved, it was due to accents on my category. As a workaround I edited my category with a name without accents.