Archived topic
Add code before tag using functions.php
3 replies · Started by Kemo on March 19, 2019
Hi!
Can you guide me how to add a code snippet just before the end of the BODY tag using my child theme's functions.php?
usually, I'd add it to footer.php, but my child theme doesn't have one and not sure how to create it.
thanks
Hi there,
are you using the Parent Theme footer ? If so then the after_footer hook still exists:
https://docs.generatepress.com/article/generate_after_footer/
You can also use the Hook Element to also add content/code there.
I'm still using it. thanks I'll check that out.
You're welcome. Let us know