-
AuthorPosts
-
April 22, 2017 at 12:45 pm #781651
Hi,
I’m having trouble inserting my Google Adsense code into the Text Widget box, to be displayed in the footer or sidebar. When I enter the code into the text widget box and click save, it shortens the code into the following:
<!– WordPress –>
<ins class=”adsbygoogle”></ins>(adsbygoogle = window.adsbygoogle || []).push({});
It then just displays this as text.
Please can anyone advise what I’m doing wrong and how to display ads using the Widget function?
I can get the ads to display without issue on the main body of my pages.
Thanks for your time.
Tim
April 22, 2017 at 1:56 pm #781672Hey Timothy,
Please refer to the following thread which may provide the exact solution you need:
https://kriesi.at/support/topic/best-way-to-insert-adsense-code-into-enfold/
Best regards,
Jordan ShannonApril 22, 2017 at 3:01 pm #781680Hi Jordan,
Thanks for your reply.
It doesn’t explain why when I paste the code into the text widget, it automatically shortens it. Surely I should just be able to insert the Adsense code into the text Widget?
Kind Regards,
Tim
April 22, 2017 at 4:53 pm #781697Hi,
Is this a self-hosted site, meaning not hosted on wordpress.com
Best regards,
Jordan ShannonApril 22, 2017 at 5:45 pm #781720Hi Jordan,
Thanks for your reply.
Yes it’s hosted on a different server.
Kind Regards,
Tim
April 22, 2017 at 8:59 pm #781762Hi,
Please use this plugin: http://wordpress.org/plugins/insert-html-snippet/ to insert raw js or css code into the text box. Our theme uses the wpautp() function to sanitize the text content and maybe it does not interpret your raw code properly. Please attempt this fix and the one I linked you to above. If neither of them work then we will investigate further.
Best regards,
Jordan ShannonApril 22, 2017 at 10:50 pm #781805Okay will give that a go. Thanks Jordan.
April 22, 2017 at 10:54 pm #781806Hi,
No problem. Let us know how it turns out.
Best regards,
Jordan ShannonApril 24, 2017 at 8:50 pm #782524Hi Jordan,
Just to advised that I installed: https://wordpress.org/plugins/wordpress-plugin-for-simple-google-adsense-insertion/
and this fixed the issue – I can now place Adsense adverts in the Sidebar widgets.
Thanks for your help,
Tim
April 24, 2017 at 8:59 pm #782527Hi!
Happy you can solve it
Please feel free to let us know if there is anything else you might need.Thank you
Best regards,
Basilis -
AuthorPosts
- The topic ‘Google Adsense Code’ is closed to new replies.