Adsense issue

Hi … my site http://edgazette.co.uk has been working very well for months, but has recently stopped displaying google ads in some positions (not all).

As an example there should be an ad displayed in the white area above the heading “Popular Topics” on the home page.

The element seems to be returning this error …

TagError: adsbygoogle.push() error: No slot size for availableWidth=0

Have tried solutions found in a google search but haven’t been able to fix the problem.

Nothing has changed on my site, other than updating wordpress/theme x/cornerstone etc. Have checked my adsense account, and its fine, with no issues or violations.

Any suggestions would be gratefully received.

Many thanks, Chris.

Hi There,

Thanks for writing in! Could you please try following this similar thread and see if that helps.

If not, provide us with your login credentials in a secure note to check your issue.

Thanks!

Thanks, have worked through that thread and still have the problem. Same code displays in some positions but not others.

Have sent login credentials by secure note.

Hi There,

That issue has something to do with the size of your ads container. Please add this on your Text element’s style field.

width: 1200px;height: 90px;margin: auto;

Then clear all your caching and optimizer plugins.

If that does not work, please do a testing for a plugin conflict. You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

Let us know how it goes,
Cheers!

Thanks for the reply.

Unfortunately neither option has worked. The styling had no effect (tried this previously as well), and there’s no plugin conflict.

I can get the ad to display whilst editing the home page in Cornerstone though. If I edit the ‘Classic Element’ that the ad is contained within, and simply add a few returns and then delete them, the ad appears. I then save the element, but the ad does not appear on the live page (after flushing the cache etc).

Have even tried creating a new ad in adsense and using that instead, but the same issue occurs.

Would be most grateful if you could investigate further.

Many thanks, Chris.

HI Chris,

Instead of using a text element, please try adding the code in a Raw Content element as it should be able to handle JS code.

Hope this helps.

Hi … this hasn’t worked either, but it did enable me to find this out …

If I add a second element underneath (raw content or text) with an ad in it, then the ad in the original element appears but the new one does not.

If I then create another element in the footer with an ad in it, the second ad (as added above) appears, but the new one in the footer does not.

So it seems that it’s always the last ad on the page that does not appear, and that it’s not related to the elements themselves.

Seems strange! … any ideas how to sort this out?

Many thanks,

Chris.

Hey Chris,

I see an ad above the Popular Topics section.

This sounds like an issue with Adsense. But, to be sure, would you mind testing adding the Adsense code in the default WordPress theme? If switching to the default theme in your live site not possible, please copy your site to a staging server and test there. The result will give us additional information leading to the cause of the issue.

Thanks.

I’m afraid I don’t have a test server, and switching to default theme and back messes up referencing in my custom CSS.

Don’t really see how it can be an adsense issue, as it’s not been widely reported or noticed?

Many thanks,

Chris.

Actually … may have just found the problem … I think it’s to do with hidden ads … will investigate and let you know.

Let us know how it goes.

Yes … it was to do with hidden ads. I was adding one in functions.php for my mobile layout. Using the following sorted the problem …

Hiding an ad unit
In certain cases, particularly on smaller mobile devices, you might not want to show an ad at all. If you do want to hide an ad unit, you can set a parameter with CSS media queries so that no ad request is made and no ad is shown. The following example shows you how to make these modifications:

Hiding ads for specific screen sizes example
If you want to only show ads for certain screen sizes you can use CSS to accomplish this. The following example shows you how to modify your ad code to use CSS3 media queries to hide ads for specific screen sizes:

.adslot_1 { display:inline-block; width: 320px; height: 50px; } @media (max-width: 400px) { .adslot_1 { display: none; } } @media (min-width:500px) { .adslot_1 { width: 468px; height: 60px; } } @media (min-width:800px) { .adslot_1 { width: 728px; height: 90px; } }

In this example, no ads will be displayed if the screen width is less than 400px.

Hi there.

Glad that you have managed to fix the problem. We also have somewhat the same functionality which I am not sure if it will be a help or not but worths the try:

Thank you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.