Home › Forums › Gillion Theme › Trouble with Adsense AMP & Custom JS
Home › Forums › Gillion Theme › Trouble with Adsense AMP & Custom JS
Hello I’m trying to add some Google Adsense AMP banners. It wants me to add the AMP javascript to the <head>. I’ve tried with using Gillion’s Custom Code page in Theme Settings but it seems to have no effect.
My only choice was to modify the header.php in Theme Editor but I don’t want to edit the theme directly.
Thanks for your help.
Hi @ryanmaule,
I hope you are well today and thank you for your question.
You can add the js code in the header as described on the below pages.
https://www.wpbeginner.com/plugins/how-to-add-header-and-footer-code-in-wordpress/
https://kinsta.com/knowledgebase/add-code-wordpress-header-footer/
https://technumero.com/add-code-in-wordpress-header-and-footer/
Best regards,
Shufflehound team
Thanks, so you also recommend not using the Custom Code setting?
I will keep my current modification to header.php and re-add it if there are upgrades in the future that wipe it out.
Thanks, so you also recommend not using the Custom Code setting?
No, as it does not place the JS script in the header in the exact position.
I will keep my current modification to header.php and re-add it if there are upgrades in the future that wipe it out.
You can avoid that by using the solution as shared above.