Last active
March 17, 2022 15:37
-
-
Save git-bhanu/6d52f11641128f3d115c6781224399e6 to your computer and use it in GitHub Desktop.
This is the forked verison of plugin made by Gijo. You can view the main version here https://wpspeedmatters.com/fastest-cookie-consent-wordpress-plugin/
Hi there i am suing this and get the cookie pop up but no link appears to my privacy policy...I have changed that line to read as this;
Privacy Policy
Am I doing something wrong?
Can you share the link of your website.
Hi there its https://thegapdecaders.com
Hi there its https://thegapdecaders.com
Hey the-gap-decaders,
I found out the issue that you were having.
<p id="cookie-notice" style="visibility: visible; color: white">
This website uses cookies to ensure you have the best experience.
<a href="https://thegapdecaders.com/privacy-policy" style="color: white"> Privacy Policy </a> <br>
<button onclick="acceptCookie();">Got it!</button></p>
The problems were.
- You had
{{ your link}}
added insidehref=""
. It was supposed to just be a placeholder. - The default color of
a
tag. that is the link, was same as your themes color, which is your background color as well. I have addedstyle="color: white"
. This should solve your problem.
The final code that you should use is:
<p id="cookie-notice" style="visibility: visible; color: white">
This website uses cookies to ensure you have the best experience.
<a href="https://thegapdecaders.com/privacy-policy" style="color: white"> Privacy Policy </a> <br>
<button onclick="acceptCookie();">Got it!</button></p>
<style>#cookie-notice{color:#fff;font-family:inherit;background:#596cd5;padding:20px;position:fixed;bottom:10px;left:10px;width:100%;max-width:300px;box-shadow:0 10px 20px rgba(0,0,0,.2);border-radius:5px;margin:0px;visibility:hidden;z-index:1000000;box-sizing:border-box}#cookie-notice button{color:inherit;background:#3842c7;border:0;padding:10px;margin-top:10px;width:100%;cursor:pointer}@media only screen and (max-width:600px){#cookie-notice{max-width:100%;bottom:0;left:0;border-radius:0}}</style>
<script>function acceptCookie(){document.cookie="cookieaccepted=1; expires=Thu, 18 Dec 2030 12:00:00 UTC; path=/",document.getElementById("cookie-notice").style.visibility="hidden"}document.cookie.indexOf("cookieaccepted")<0&&(document.getElementById("cookie-notice").style.visibility="visible");</script>
Hi there! Thaks for the snippet. Is there anyway this can be translated? I mean, I need to display it in two languages.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there i am suing this and get the cookie pop up but no link appears to my privacy policy...I have changed that line to read as this;
Privacy Policy
Am I doing something wrong?