• First off, let me just say this is the most amazing wordpress theme ever created. My only issue with it is that I cannot seem to get any google adsense ads to display (not an issue with my google account.) No matter where I place the adsense javascript code, it simply will not display an ad. I’ve been trying for about 10 days, and i cant’t seem to get it figured out. I’ve tried using ad plugins…I’ve tried disabling all plugins. Nothing seems to work. This theme itself uses a lot of javascript, and in general there is a lot going on codewise. I’m just wondering if there is some kind of conflict.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Theme Author Joy

    (@joyously)

    First off, thanks for the feedback!

    As for ads, are you sure they show when you are the visitor? Do you have an ad blocker on your browser?
    This theme is actually pretty light on javascript. There is one script that manipulates CSS, but that should not affect ads.
    Before you conclude that it is the theme, can you switch themes to one of the WordPres Twenty* themes, and see if it works differently?

    Thread Starter brandonadamson

    (@brandonadamson)

    Thanks for the response. Yes I switched to the “2016” theme and the ads show when I place the javascript adsense code in widgets. In fact, the ad showed up instantly as soon as I changed themes. I don’t have any ad blockers, and I tested on Chrome and also on mobile (Safari browser.)

    When placing the code in widgets I see the following error message in the console:

    VM4044 adsbygoogle.js:1 Uncaught L?{message: “adsbygoogle.push() error: No slot size for availableWidth=0”, name: “TagError”, stack: “TagError: adsbygoogle.push() error: No slot size f…syndication.com/pagead/js/adsbygoogle.js:1:20385)”}
    jd @ VM4044 adsbygoogle.js:1
    sd @ VM4044 adsbygoogle.js:1
    Ch @ VM4044 adsbygoogle.js:1
    (anonymous) @ VM4044 adsbygoogle.js:1
    (anonymous) @ VM4044 adsbygoogle.js:1
    VM4044 adsbygoogle.js:1 Uncaught L?{message: “adsbygoogle.push() error: No slot size for availableWidth=0”, name: “TagError”, stack: “TagError: adsbygoogle.push() error: No slot size f…syndication.com/pagead/js/adsbygoogle.js:1:20385)”}

    Someone else seemed to have the same issue (with a different theme)

    Theme Author Joy

    (@joyously)

    OK, that makes sense that the ads don’t show because the Google script has a bug in it.
    The “fix” that you point to won’t work for this theme. The real fix should be in the ad script, where it correctly gets the actual width, not a coded width.
    The theme uses width in CSS, but in percentages. This does produce a real width, as you see it in the browser, and javascript can read that width. But apparently the ad script is not doing it correctly.

    You can try putting some widths in Customizer > Additional CSS, but I don’t know what they should be. That’s why I used percentages.
    Working CSS should not have to change for poor javascript.

    Theme Author Joy

    (@joyously)

    I’m wondering if you could test something. Try putting a CSS rule for body {width: 100%} and see if that helps. If not, add html {width: 100%} also, just to see.
    Maybe the descendant widths need a parent width to start with.

    Thread Starter brandonadamson

    (@brandonadamson)

    Thanks! I tried those too, but it didn’t seem to resolve the issue. I still get the same error message. I know there has to be some really simple workaround i’m missing, but I can’t figure it out.

    Theme Author Joy

    (@joyously)

    Is there a place in Adsense where you could ask about the error?

    The only solution I found for this problem so far is defining ad unit sizes per screen as described under Exact ad unit size per screen width example in in the AdSense manual.

    That definitely fixes that particular problem.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Adsense compatibility issue’ is closed to new replies.