Archived topic
Need help with where/how to include code in GUI
1 reply · Started by Matthew on October 6, 2020
Hey guys,
Please walk me through how to add custom code (i.e. JavaScript) in the following two locations using the GeneratePress GUI instead of manually "hacking" the core theme files or dealing with a child theme just for one line of code:
1. Right before the closing <head> tag
2. Right before the closing <body> tag
Thanks in advance for your help!
Hi there,
1. That would be the wp_head hook:
https://github.com/tomusborne/generatepress/blob/master/header.php#L17
2. That would be the wp_footer hook:
https://github.com/tomusborne/generatepress/blob/master/footer.php#L61
Both are included in the hooks element module:
https://docs.generatepress.com/article/hooks-element-overview/