Hi Simion
I’ve got it thanks. Based on what you give me in that first link I went looking for what a ‘data-ad-slot’ was.
So for anyone else having this issue getting ads to show inline when using cloud templates:
1. go to your google adsense account
2. My Ads > Content > Ad units
3. I already had an ad unit created so was able to click ‘get code’ and paste that code into the ad slots with the cloud template. This worked.
Thanks Simion.
Naomi
Hi, Sorry for the slow response – so many other things to do!
So when it worked for you in a cloud template, which part of the adsense code did you use. It’s not working with it all entered – seems to be this bit that is the problem [enable_page_level_ads: true] but you obviously can’t just remove and setting it to ‘false’ doesn’t help…
<script async src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: “ca-pub-3503819165109177”,
enable_page_level_ads: true
});
</script>
Thanks for taking time to look into this. I’ve had a look at all your links and yes that is the issue. however, before I open up a forum topic perhaps it’s worth asking this:
This post, for example, is using one of your default templates and is working fine. https://wmw-dev.co.uk/police-seize-uninsured-scrambler-from-young-person/
What adsense code is that default template adding into the page content that I’m doing differently? I was just copying and pasting the full adsense code block which is obviously wrong. It’s being done correctly in your default template. I can’t see what I should be posting instead?
Thanks,
Naomi
Hello again,
So I double-checked the adsense code snippet. It’s correct.
1. Ads added using tagdiv blocks on the homepage insist on appearing as squares, even though the space would suggest they should be long and thin. These are Custom Ads 1 and 2 and the code snippet I’ve pasted into theme panel is:
<script async src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: “ca-pub-3503819165109177”,
enable_page_level_ads: true
});
</script>
Auto size is definitely on for all screen sizes. I haven’t changed any sizing from the default setting of auto.
2. Into my Cloud Template – property category (so still using the link/example from my previous post) I’ve copied and pasted the code for the ad from sidebar which I know is working. This is done using TagDiv Composer and editing the ad positions that you access when you click on “sample post content” within the template editor. I want the ads to appear top of the article, inline (after 3 paragraphs) and article bottom of the property posts. (I’ve now removed the titles from ads so you don’t see the positions marked anymore). Still not appearing.
3. Copied the ad code from the article top ad position (property template) and adding it to sidebar ad within theme panel. Saved. Refreshed. Sidebar ads do still appear.
4. Not sure I’m doing this right. Created new page. Opened in tagdiv composer. Added ‘Column text’ element. Copied my ad code snippet (the one that works for sidebar) into the ‘edit content’ editor – text view rather than visual. saved. I see nothing other than the block title? https://wmw-dev.co.uk/test-ad-page/ (Also added an adspot – sidebar) and that seems ok.
Any thoughts and advice much appreciated?
Thanks,
Naomi
Good thinking. Thank you. Will report back.
Naomi
This is happening for me too. Following.