Hello again,
Been using Newmag since December 2014. Love the theme! Just have one recent problem.
I’ve gone back to using an adsense leaderboard above the menu with header style #3. http://bit.ly/1AOikBD
After three (3) days there is still no ads displaying.
When I use the Google Adsense troubleshooting guide, it says I should be able to see the entire adsense google code snippet in source. However, when I look at source, the adsense code is missing and all that is visible is the call for the script. http://screencast.com/t/IzORd9qMFzw
This is a persistent issue. It hasn’t been a problem until now because I had local banner ads in there to use.
I can not get google adsense to appear there and this is important to fix. I have a complicated setup and any number of variables could be effecting it. I use Cloudflare, WPEngine, the Themes aggressive speed modifications/custom ad engine and any number of WP plugins are all likely candidates for interference.
I have tried to paste the code directly into the theme panel, no effect.
I have tried using AdRotate to show the ad, no effect.
I DO have google adsense in other places on my site and that is working ok. I have two search bars, one adsense in inline ads and one adsense in article bottom ads. These are currently working.
I would much appreciate some special attention to this issue. Thank you.
This presumes you have the desktop/mobile “enabled” vs “disabled” in your theme panel where you have pasted in the complete adsense code snippet?
I’m using header 8 and mine work perfectly across multiple sites even with stuff like mod_pagespeed doing on the fly page rewrites to remove spaces and comments.
Do you have example of the adsense code you’re pasting in to the adsense ad box ?
@ Chris S
Always a pleasure to see your comments. Thank you for being an active part of this community.
Here is the adsense code. Funny thing, when I place this code into AdRotate, the preview shows the ad just fine, and it is a different ad each time (which it should be) and it is responsive (which it should be).
But I can’t get the theme to show it at all. 🙁
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- RSM Responsive Header Ad both -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-7058286483145389"
data-ad-slot="9979587344"
data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
-
This reply was modified 11 years by
Breakwater. Reason: grammar
Hm.
okay, in my header ad box I have
desktop on (grey toggle); size 970×90
tablet portrait on (grey toggle); size auto
phone off (blue toggle > right)
my code looks the same –
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- 2015 Responsive States -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-XXXXXXXXXXXXXXXXXX"
data-ad-slot="XXXXXXXXXXXXX"
data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
So, it might be something funky like a minification setting or a “java optimization” setting in your Cloudflare, WPEngine — maybe there is a setting there to “ignore” a specific block of code?
I would probably turn OFF one or both of those if you are able to see if maybe they are “re-writing” the javascript for some oddball reason. “Re-writing” — such as scripts that minify, move, re-write javascript can sometimes break the simplest thing if they can’t parse “the syntax” or the “locale” of the code for some odd reason. I ran into this with mod_pagespeed with javascript optimizations — just turned it all off !
-
This reply was modified 11 years by
simchris.
and prints on page as so:
<div class="td-header-container">
<div class="td-header-row td-header-header">
<div class="td-header-sp-ads">
<div class="td-header-ad-wrap td-ad-m td-ad-tp">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script><div class="td-g-rec td-g-rec-id-header">
<script type="text/javascript">var td_screen_width=document.body.clientWidth;if(td_screen_width>=1024){document.write('<ins class="adsbygoogle" style="display:inline-block;width:970px;height:90px" data-ad-client="ca-pub-xxxxxxxxxxxxx" data-ad-slot="xxxxxxxxxxxxx"></ins>');(adsbygoogle=window.adsbygoogle||[]).push({});}
if(td_screen_width>=768&&td_screen_width<1024){document.write('<ins class="adsbygoogle" style="display:inline-block;width:468px;height:60px" data-ad-client="ca-pub-6556273450138383" data-ad-slot="4322696829"></ins>');(adsbygoogle=window.adsbygoogle||[]).push({});}</script>
</div>
</div> </div>
</div>
Thank you @Chris S – Got it working. It was the minification through Cloudflare! Now to work on a solution. You the man!