• Resolved mikekellner

    (@mikekellner)


    AMAZING PLUGIN – THANK YOU SO MUCH FOR DEVELOPING THIS

    Is there a way to display a div IF cookies have not been consented?

    So this might work like: If cookies ARE consented > .given-css-class {display: none;}

    I want to show a conditional message to encourage people to activate cookies to use a feature on my website that requires cookies.

    Many thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter mikekellner

    (@mikekellner)

    SOLVED

    By using the ‘Add scripts to HEADER’ box in the plugins settings page, I added a CSS class with the property ‘display:none;’

    I then added that class to the div, and it works great. The div shows until cookies are enabled. Once cookies are enabled, the div hides.

    hi @mikekellner!
    how did you do this?
    i want to hide a video and display a message to enable cookies (maybe a shortcode to open gdbr box
    when user approves then i want to display this video

    • This reply was modified 6 years, 10 months ago by nickfr.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘css class to show to anyone who does not consent’ is closed to new replies.