Theme Author
Tom
(@edge22)
Hi there,
Are you adding it to the header widget? If so, what kind of ad? Is there enough space for it?
Try adding this CSS:
.header-widget {
max-width: 100%;
overflow: visible;
}
Let me know 🙂
Thread Starter
alve39
(@alve39)
Yes, I’m adding the code to the header widget. I choose responsive ads and added the css code you gave, but still ads does not show up.
Anything else I can try?
Theme Author
Tom
(@edge22)
Just read through this: https://stackoverflow.com/a/40763344/2391422
What if you add this?:
ins {
min-width: 300px;
min-height: 50px;
}
Thread Starter
alve39
(@alve39)
Thanks for replying. I just added the new code you gave. Now ads appear, but even when I refresh the page several times, only vertical ads are displayed. As you can imagine, vertical ads do not look very good on header.
If you can find a solution to this problem, please reply.
Thanks.
Thread Starter
alve39
(@alve39)
Hey Tom, I found the solution. I followed the instruction by google from this page https://support.google.com/adsense/answer/9183363?visit_id=637068889755459925-780196868&rd=1
And I added this css code
@media(min-width: 500px) { .headerAds{ width: 468px; height: 60px; } }
@media(min-width: 800px) { .headerAds{ width: 728px; height: 90px; } }
<ins class=”adsbygoogle headerAds”
style=”display:block”
data-ad-client=”ca-pub-xxx”
data-ad-slot=”xxx”
data-ad-format=”auto”
data-full-width-responsive=”true”>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
and removed the code “data-ad-format=”auto”
Now ads are showing the way I need.
Theme Author
Tom
(@edge22)
Awesome, glad you got it working 🙂