Archived topic
Cookies disclaimer
3 replies · Started by Jordi on January 10, 2019
Hi! Want to add for a cookies consent bar with this code
< script src="http://mydomain.com/cookiechoices.js">< /script>
< script>document.addEventListener('DOMContentLoaded', function(event) {
cookieChoices.showCookieConsentBar('Usamos cookies para mejorar los servicios y mostrar publicidad según su navegación. Si continúas las aceptas. + Info.', 'Aceptar', 'aquí', 'http://mydomain.com/url-del-aviso-de-cookies/');});< /script>
The insctructions say to put this code in the footer of theme, how can I put it without change the core footer php?
Thank you
Hi there,
you can add it to the WP_footer hook using the Hook Element:
https://docs.generatepress.com/article/hooks-element-overview/
Thank you David, but with this option shows direct the script code and no like this website https://portalesdeempleo.es/ (look at bootom of site the cookie bar)
Are you sure the code itself is working?
Did you replace mydomain with your actual domain?