Leo
(@leohsiang)
Thread Starter
Anonymous User
(@anonymized-18703045)
Hello, I think it’s too difficult for me.
I use Elementor, could that be a solution? I mean, add the html widget wherever in the page, paste the script and save.
¿?
Best regards,
Leo
(@leohsiang)
This would be unrelated to Elementor.
If the code is to be added in the <head> area then you would need to use the wp_head hook.
The Hooks element in GP Premium would make this very easy;
https://docs.generatepress.com/article/hooks-element-overview/
If not then here are a couple of examples of using the function:
https://ww.wp.xz.cn/support/topic/add-code-in-category-head/#post-13198148
https://ww.wp.xz.cn/support/topic/generatepress-i-want-to-add-my-own-code-to-the-header/
Hope this helps 🙂
Thread Starter
Anonymous User
(@anonymized-18703045)
Hi,
I don’t have GP premium so I can not do that.
Thanks for the examples but I don’t have skills to do that either. This is “adding php”?
Should I follow this document? https://docs.generatepress.com/article/adding-php/
Leo
(@leohsiang)
Yes – the Adding PHP article shows you ways of adding functions to your site.
Using the Code Snippets plugin is the easiest method unless you are using a child theme already 🙂