Archived topic
Inject Cookie Consent Tool into the head of the website
4 replies · Started by Cathrin on April 3, 2022
Hi there,
I want to inject an HTML code for a cookie consent tool into the header code of my website. How do I go about this with the GeneratePress websites?
Thank you!
Hi there,
you can use a Hook Element:
https://docs.generatepress.com/article/hooks-element-overview/
1. Go to Appearance > GeneratePress and enable the Elements module.
2. Appearance > Elements > New -> Hook Element.
2.1. Add you script in the hook text area.
2.2. Set the Hook to wp_head
2.3. Set the Display Rules to the Entire Site.
Thank you, David!
This has solved my problem.
Glad to hear that