Hide the Cookie Bar on Selected Pages Using GDPR Cookie Consent Plugin

The following code snippet allows you to hide the cookie bar on selected pages of the website or any wildcard URL entry. Simply add the code snippet to the active child theme function.php and enter the slug of the pages in the array() function on which you want to the hide the cookie bar.

  • Was this article helpful ?
  • YesNo

4 thoughts on “Hide the Cookie Bar on Selected Pages Using GDPR Cookie Consent Plugin

  1. Martin Rademacher
    Martin says:

    If I use that code snippet I get javascript errors on pages without the cookie bar
    TypeError: undefined is not an object (evaluating ‘this.settings.showagain_tab’)
    TypeError: undefined is not an object (evaluating ‘textBlock.html().length’)

    What do I have to do?

  2. Amy says:

    Hello,
    I’m sorry but it is complicated for me to use the php code.
    I know that I have to go to my Editor menu and select the functions.php but I don’t know which slug of page I have to add in order to delete the cookie law text from the error page regarding the post considered as spam.

    Could you please help me more to solve this issue. I will add my website url in the field requested.
    The issue happens when we clik on an article and someone click on send your message without completing the fields requested.

    Thank you.

Leave a Reply

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