Include in the tag of every page (for iubenda)

Posted in: Newspaper
Post count: 116

Hi all.

I need to include in every tag <HEAD> of every page this code.
What is the best way to this?

<script type="text/javascript" src="https://cdn.iubenda.com/consent_solution/iubenda_cons.js"></script>
<script type="text/javascript">
_iub.cons.init({
api_key: "xxx"
});
</script>

Really thanks.

Post count: 20685

Hi,

There is only one head tag, this is loaded for all the pages of the website. The head tag is located in the theme header file
https://www.screencast.com/t/A9NoDpXB
So enter your code there and it will be loaded on the whole website.

Thanks

Post count: 116

Thanks Simion.
Can i add the code from the backend of theme option?
If NOT and i use the child theme can i edit the theme-child/header.php?

Thanks again.

Post count: 20685

Add it in the child theme header file (copy it from the main theme), that should work as well. Check after entering.

Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.