- This topic has 14 replies, 5 voices, and was last updated 7 years, 8 months ago by
Leo.
-
AuthorPosts
-
February 27, 2018 at 6:48 am #506952
jaya swaroop
i like to add auto ads from adsense to our theme
please help me to resolveFebruary 27, 2018 at 9:13 am #507119Leo
StaffCustomer SupportHi there,
Check out this thread: https://generatepress.com/forums/topic/google-adsense/
February 27, 2018 at 7:54 pm #507482jaya swaroop
nothing was changed in my website
resolve my problemFebruary 27, 2018 at 9:03 pm #507502Leo
StaffCustomer SupportWhere and what was the code you’ve added?
February 27, 2018 at 11:42 pm #507575jaya swaroop
<script async src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: “ca-pub-xxxxxxxxxxxx”,
enable_page_level_ads: true
});
</script>i added the code in wp_head
February 28, 2018 at 6:34 am #507846jaya swaroop
Hello leo
generatepress theme will support autoads or notFebruary 28, 2018 at 9:17 am #508054Leo
StaffCustomer SupportI believe Google asks that part of the code to be in the
<head>section correct?If so
wp_headhook is what you are looking for:
https://docs.generatepress.com/article/wp-head/
https://docs.generatepress.com/article/hooks-overview/February 28, 2018 at 11:08 pm #508548jaya swaroop
hello leo i added in the same part wp_head no improvements
March 1, 2018 at 3:40 am #508693Lyle
jaya –
Where are you wanting the ads to appear?
For example, if you want them to appear in a sidebar, then add an HTML widget to the sidebar location and paste the AdSense code into it and Save.
Or, if you want to have the ad appear at the top of the page, add the code to the Before Header GP Hook location.
You can also get fancy and use PHP to conditionally display the ads in the various GP Hooks locations. On one of my sites, I have it set to display the ad only on single posts and below the content.
This is what I do on all of my sites that have Google AdSense ads 🙂
Cheers!
LyleJune 12, 2018 at 8:09 am #598342Karine
Lyle, thanks a lot for the tips! I have already ads running on my blog, by this moment there are maximum 2 appearing per page https://www.karikfood.com
and I tried your first suggestion in order to add extra ads (this time Auto Ads), adding HTML widget on sidebar area, but it seems it doesnt work. Did I make something wrong? Maybe it is not compatible with already existing ads or plugin (WP QUADS – Quick AdSense).June 12, 2018 at 12:39 pm #598505Leo
StaffCustomer SupportYou got a few console errors coming from the ads which I believe is causing them not showing:
http://www.screencast.com/t/8W7MnOni3Might be worth checking with the source of wherever you got the code/ads.
June 12, 2018 at 1:51 pm #598556Karine
Leo, thanks for your swift reply. Don´t understand well what exactly I have to do. Will I quit that HTML widget area with the code within put in the sidebar?
June 12, 2018 at 3:19 pm #598612Leo
StaffCustomer SupportActually this is the error: http://www.screencast.com/t/7dcV6eUSx
Someone else had a some error yesterday: https://generatepress.com/forums/topic/problems-with-google-ads-recommended-content-block/#post-597549
August 15, 2018 at 12:12 pm #649663Darren
Have these methods changed, in the age of Elements if you will?
That is, having installed Elements, how might I add adsense auto ads?
The Code Snippets plugin seemed to crash my site.
ThanksAugust 15, 2018 at 5:48 pm #649966Leo
StaffCustomer SupportYou can use the
wp_headhook in Hooks Element:
https://docs.generatepress.com/article/hooks-element-overview/If you need more help on this, please open a new topic 🙂
Thanks!
-
AuthorPosts
- The topic ‘how to add auto ads from adsense in theme’ is closed to new replies.