Code in the header with a child theme?
I would like to add a piece of code to my header:
But, of course, every time I would update the theme I would have to add the code manually again. Is there a way to implement the code somewhere (child theme maybe?) so that it would also be there after an update?Mod
AnonymousNovember 9, 2011 at 8:37 pm #19536
Can you just create an action hook in the header.php, try the
I don’t think the script will show anything, and I haven’t tested this, but give it a try and see what happens.
I’m curious 🙂
AnonymousNovember 9, 2011 at 9:04 pm #19538
Awesome. Great to know.
Yeah, I’ve seen a lot of people having issues with the counters using various social sharing.
Glad you got it working!
ALSO: This might be a good place to store any scripts in the future that require being placed in the header. I know various add-ons require a script code in the header. Maybe this could be used like a “script tank”??
Thanks for testing!
- You must be logged in to reply to this topic.