Recently I upgraded my theme version and after updating I faced following issue to one of the adsense ad displayed on my website.
Uncaught TagError: adsbygoogle.push() error: No slot size for availableWidth=0
Basically there was one ad and there might be some style changes due to which my google adsense ads were not displayed. It was showing error “No slot size for availableWidth=0”.
This error occurs when google adsense ad code is trying to insert ad and if it doesn’t find proper width to the parent container where its trying to insert ad.
I am using Mesocolumn theme and it was showing above error. Google adsense ads were not displayed only for Desktop version of the website. For mobile version it was showing proper ads. So I fixed this issue by modifying CSS. I added new CSS code.
Procedure to add new css/edit css is as – Goto Appearance -> Edit CSS and add following code. If you don’t find Edit CSS option then just go and add following code to your stylesheet.
@media only screen and (min-width:800px)and (max-width:3000px) { #topbanner { width: 640px; height: 90px; } }This is specific to my theme. You need to tweak the width and you can also add media queries for other resolutions, if required.
View Comments (2)
thanks this solved my problem!
Great