Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

Changing position of inserted Custom Scripts in the header

Home / Forums / Kadence Theme / Changing position of inserted Custom Scripts in the header

This topic is: Not a support question
[Not a support question]
Posted in: Kadence Theme
September 18, 2020 at 10:21 am

Hi

I’m using the Pro version of the theme and have enabled the Header/Footer Scripts add-on. In the customiser, I then add a few scripts to the header section (FB pixel, Google Tag Manager etc). However, I noticed that anything I add there is essentially placed last, i.e. just before the closing </head> tag.

Now, one of the scripts I’m planning to add is for cookiebot, and I know that particular script MUST be the absolutely first script to run. This is so that it can potentially disable cookies/scripts prior to a visitor’s consent. So a visitor visits the site and sees the cookie pop-up asking for consent. And any cookies/scripts marked by me as requiring consent before being activated will not take place until AFTER consent is given in the pop-up.

So this means I would need that header script to be first, i.e. immediately after the opening <head> tag. Is there a way to do that, please?

Many thanks

  • The forum ‘Kadence Theme’ is closed to new topics and replies.