Hi,
Development site: http://www.wmw-dev.co.uk
I’ve created 4 cloud templates for 4 types of news articles on my site. Each of the following has its own template:
* Property
* Business
* Lifestyle/Fashion
* Viral/ Entertainment
All the other news pages (local, regional… etc) are just using the default theme template.
Within the custom cloud templates using tagdiv composer, I’ve placed up to three google adsense ads by copying and pasting the ad code into the correct place within ‘post content’. I’ve also given each ad a title so I can see where it should be within the code. If you check out this item (https://wmw-dev.co.uk/britney-spears-former-palatial-pad-on-the-market-again/) you can see the titles but not the ads. Ads are appearing all the other places they should be – side bar, headers etc and even within the custom themes where I’ve added them outside of the post content – e.g., the row of 3 blocks at the bottom of the link I’ve given. It seems to be top / inline / bottom within ‘Post content’ that aren’t appearing.
I’d appreciate any advice you can give and am happy to supply logins if required.
Hi,
Form what I can see the ad codes could be wrong – https://www.screencast.com/t/JRDWbGlx
That code looks like the code required to be entered in the theme header.php file between the head tags in order to enable auto ads
– https://support.google.com/adsense/answer/7477845?hl=en
I could be wrong however. In that case you could try a few things. What if you try to switch the ad codes, place one that works at the moment in the top ad location. Place the one that doesn’t work in a location where ads are displayed.
Also you could try as a quick test to paste one of the ad codes which at the moment does not appear, in a test page – enter it in a column text for example.
Check what happens and mention the results. If the same code works in a different location it could be a problem we will investigate further.
Thanks
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
There seems to be a message in the browser inspector console
– https://www.screencast.com/t/XqiNBsi4gFl
Could be a limit by Adsense ads per page, so they are not served. Some topics I found here, with the same message mentioned
– https://productforums.google.com/forum/#!msg/adsense/QqM4AGC7oCY/wO0eLZ_0AQAJ
– https://productforums.google.com/forum/#!topic/adsense/ZTRFzYFeu_k;context-place=topicsearchin/adsense/Only$20one$20$27enable_page_level_ads$27$20allowed$20per$20page
– https://productforums.google.com/forum/#!topic/adsense/HQN8OzCtg74;context-place=topicsearchin/adsense/Only$20one$20$27enable_page_level_ads$27$20allowed$20per$20page
You could open a new topic in the Adsense forum, maybe some more experienced users can provide their opinion in the matter
– https://productforums.google.com/forum/#!forum/adsense
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
The default post template will use the ad codes from the theme panel, while the cloud template will use the ad codes entered in the template itself.
So if the same type of ad codes are used, which work with a default post template, they should work with a cloud template.
I believe we did test this at the time but with default responsive Adsense ads, there were no problems.
If you should find something relevant, please share it here.
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>
Default Adsense ads were used I believe, such as this ad example
– https://support.google.com/adsense/answer/181950?hl=en
Page level ads from what I can find have a different implementation. They seem to only require a one time entering of the ad code in the theme header, then they should automatically appear
– https://wpism.com/page-level-ads-adsense-wordpress/
– https://adsense.googleblog.com/2016/04/AdSense-page-level-ads.html
– http://tipsarea.com/2016/04/30/how-to-add-google-page-level-ads-to-your-wordpress-site/
– https://www.shoutmeloud.com/adsense-page-level-ads-monetize-mobile-site.html
I don’t know much about adsense ads, only what I can find online. So I could be wrong.
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