Hauke’s Projects

Playin' around with Electronics and Computers

Quick Note: Modify the WordPress Comments Cookie Consent in an Update-stable Way

It always bothered me that I could not modify the text (“Save my name, email, and website in this browser for the next time I comment.”) of the cookie consent checkbox in the WordPress comments section to explicitly mention that it uses cookies. I hate these “We use cookies – please accept” banners that bother you all the time, but of course I am really interested to stay compliant with GDPR and other laws. I found two solutions on the net:

The first is not update stable, since functions.php will potentially be overwritten by a theme update, and the second option considerably slows down the pages. And it is another plugin I need to hope that it does not contain a security issue…

Learning more about CSS, I found out that the modifications I wanted to have can be done using pure CSS, which I can add to the “Additional CSS” section in the Appearance menu of WordPress. Basically these lines did the trick:

Now it looks like this:

CSS modified Text
The text modified by CSS

This should satisfy the requirement that the user can make an informed decision to use these cookies or not. And it is update stable!


Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top