Archived topic
Add Code to Header
7 replies · Started by Daniel on May 1, 2019
Hi,
I would like to add some code to my header.
I see previous questions on this have been answered refering to 'GP hooks'?
What are these hooks? I don't see them anywhere and I have everthing enabled.
Thanks
Daniel Gillen
Hi there,
Hooks are part of the Elements module:
https://docs.generatepress.com/article/elements-overview/
Hooks are just places in the themes coding that allows you to insert code or other data. You will want to select the WP_head hook in the hook list for adding code to the site header.
I am trying to add this code but it wont work:
<script src="https://8792c80d8c0e438dbe647b77c12045e0.js.ubembed.com" async></script>
I have it set to wp-head
execute short codes and execute php are both unselected.
It's set to apply to all users.
Thanks
Daniel
Did you set the Display Rule Location? ie. to Entire Site
You can uncheck Execute PHP and Shortcodes as that doesn't apply for adding scripts like that.
Yes its set to the entire site.
PHP and shortcodes are unchecked. It doesn't work.
I can see the script in the head:

Thanks, I have raised with Unbounce to see if the fault is at their end
You're welcome.