Add custom code to head-area of every page
Hey Betheme-team,
I want to add a custom piece of code to every generated page. It has to be put to the head area. Actually I put it into the header.php but I would like to know if there is a better option without loosing this changes on every theme update.
Thanks in advance
Hirsch
I want to add a custom piece of code to every generated page. It has to be put to the head area. Actually I put it into the header.php but I would like to know if there is a better option without loosing this changes on every theme update.
Thanks in advance
Hirsch
Comments
what piece of code are you talking about? Do you mean php or html code?
<!-- Cookie Consent -->
<!-- https://cookieconsent.insites.com/download/# -->
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.css" />
<script src="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.js"></script>
<script>
window.addEventListener("load", function(){
window.cookieconsent.initialise({
"palette": {
"popup": {
"background": "#0c4d80",
"text": "#ffffff"
},
"button": {
"background": "#f7931d",
"text": "#0c4d80"
}
},
"theme": "classic",
"content": {
"message": "Unsere Webseite nutzt Cookies. Wir gehen davon aus, dass dies für dich in Ordnung ist, aber falls nicht, findest du hier Infos zum Deaktivieren der Cookies.",
"dismiss": "Akzeptieren",
"link": "Mehr Infos",
"href": "http://www.abenteuersuechtig.de/index.php/impressum/datenschutzerklaerung/"
}
})});
</script>
<!-- END Cookie Consent -->