• Capobis

    (@ioweuiraosjfosj)


    I’m using Hueman 2.2.3.

    I cannot seem to get the Header Ads to show up. I’ve enabled the widget and I’ve added my adsense code (I created a responsive ad for this area) but nothing shows. I know the widget works because I erased the ad code and just put plain text in there and it shows fine. Adblock is disabled (and ads in other areas of the site are showing).

    Any ideas here? I’m been working on this for two days. I did see something online about header ads being disabled on resolutions below 1400, but mine is currently 1440 so doesn’t seem like that would be an issue.

    Thans

Viewing 12 replies - 1 through 12 (of 12 total)
  • Hi Capobis. The header ad widget is hidden at 1200px by default to make room for the site title/icon/tagline in mobile views. I’ve seen many threads regarding the same topic that you’ve posted. It seems like the two reasons most often mentioned are (1) the ad provider hasn’t yet approved the account so there’s no data stream, or (2) there is some problem with the ad feed. There isn’t anything in the theme that would prevent the ad from being displayed.

    Thread Starter Capobis

    (@ioweuiraosjfosj)

    Thanks. I’ve also seen many threads on this topic but so far nothing fixes the issue on my end. I agree with you that there’s not a problem with the theme itself considering straight text shows up fine and my ad doesn’t. I just can’t seem to figure out the problem and was hoping someone had an idea.

    Currently my browser is at 1440px and it’s not showing the ad. I’ve even removed my custom logo thinking that was the issue (it being too wide) and that also didn’t fix the problem.

    I’m using Adsense and it’s been nearly three days now, so I know the ad should show up by now and actually, when I use inspect element in Chrome, I see the ad code in the HTML, it just doesn’t show up on the page.

    If you have any other ideas maybe I’d love to hear them.

    That’s typically what I see; the ad structure exists but it’s not being displayed. I don’t have any additional ideas other than to contact the ad provider and check on the status of your account.

    Thread Starter Capobis

    (@ioweuiraosjfosj)

    Thanks. Status of my account is fine with Adsense. I’ve got two other Adsense ads live on this site right now with no issues, so I know it’s not a problem with the ad or provider

    Thread Starter Capobis

    (@ioweuiraosjfosj)

    So I ended up just adding my adsense code into the header.php template and floating it to the right so it sits next to the logo. It works fine so I know it’s not a problem with my ad. It’s not exactly how I prefer to handle it, but I’m tired of beating my head against the wall trying to figure out the header ads widget area. I’m sure it’s just a misunderstanding on my part with how it works or what sizes it works with. Maybe the author will ad some basic instructions somewhere in the theme options for this area so it makes a little more sense.

    If you still have the ad code in the header widget, I’ll take a look at the configuration if you can post a link to your site.

    Thread Starter Capobis

    (@ioweuiraosjfosj)

    https://www.berniesanderspotus.com/

    Currently header ads are turned on and my ad code is pasted into a “text” widget for the header ads area. The new header ad area that I created in header.php template file has simply been hidden with display: none

    Thanks.

    When I remove the display:none style on the header-ad div it doesn’t show any ads. The theme header-ads widget is showing a size of 0px x 0px which would indicate there isn’t any content. In Developer Tools I’m seeing this error:

    Uncaught TagError: adsbygoogle.push() error: No slot size for availableWidth=0
    pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:4

    Thread Starter Capobis

    (@ioweuiraosjfosj)

    I’m not sure why removing the display: none via inspect element doesn’t make the ad appear. That said, I removed display: none from the backend code and you can now see the ad live on the site and the only thing I’ve removed is the display: none from the CSS.

    As for the 0px x 0px, I have no idea why that’s the case. The code I have in the header-ads (built into the Hueman theme) area is the exact same code I’m using in my custom added “heaader-ad” (not the lack of “s”) area which I just inserted into header.php (which is now live on the site).

    I now see the div you added and the ad displayed. Seems like there must be something else is going on because adding or removing display:none shouldn’t have any affect on the script. It appears that the script in the theme widget isn’t running to build out the ad structure and the widget still has a 0x0 size. I’m also still seeing the same error message in Developer Tools.

    Something else I just noticed. The two ad blocks are the same except:
    1. The theme widget has two additional <div> elements which shouldn’t make any difference.
    2. The code is the same EXCEPT the data-ad-slot parameter; they have different values. I don’t know what those values represent or if they’re significant.

    <div class="header-ad">
    <script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
    <!-- BSPOTUS Header -->
    <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-9022826841749694" data-ad-slot="9291685532" data-ad-format="auto" data-adsbygoogle-status="done"></ins>
    <script>
    (adsbygoogle = window.adsbygoogle || []).push({});
    </script>
    </div>
    <div id="header-ads">
    <div id="text-5" class="widget widget_text">
    <div class="textwidget">
    <script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
    <!-- BSPOTUS Header -->
    <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-9022826841749694" data-ad-slot="7796762731" data-ad-format="auto" data-adsbygoogle-status="done"></ins>
    <script>
    (adsbygoogle = window.adsbygoogle || []).push({});
    </script>
    </div>
    </div>
    </div>
    Thread Starter Capobis

    (@ioweuiraosjfosj)

    I think that data-ad-slot parameter is different on these because I noticed yesterday through all this testing that the background color of the ad was wrong so I went in and actually created an identical responsive ad only with a different background color. “header-ad” the area that I manually inserted into header.php has this updated ad code while the header ads widget does not. So that’s the reason for the different numbers which shouldn’t matter I don’t think.

    Real mystery here.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Header Ads not working’ is closed to new replies.