Header Ad code

Posted in: Newspaper
Post count: 50

I have a google adsense code which is wrapped with another code that controls the adsense code. But when I put this code in the ad section of the theme, the additional code seems to be removed as a javascript just runs with the publisher and data id from the adsense part of the code. Is there a way the theme would run the code the way it is?
I tried to put the code in the header file (header-style-11.php) before the ad part of the code, it works but the ad block is not centered, it is towards the left. I put the some classes (check the first two line of the code), but it didn’t help. The code is provided below,

<div class=”td-banner-wrap-full td-banner-bg td-container-wrap”>
<div class=”td-container-header td-header-row td-header-header”>

<!– Ezoic – Header Ad Wrap – top_of_page –>
<div id=”ezoic-pub-ad-placeholder-100″>
<script async src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>
<!– Header Ad –>
<ins class=”adsbygoogle”
style=”display:block”
data-ad-client=”ca-pub-5555555555555555″
data-ad-slot=”3333333333″
data-ad-format=”auto”></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
<!– End Ezoic – Header Ad Wrap – top_of_page –>

</div>
</div>

Post count: 20688

Hi,

I believe the theme will not display anything else except the ad itself. If this code is required to display, you could try to use a plugin like Adrotate to insert the ads in the website.
This ad plugin works for other theme users, and it may be a solution in this case as well. You could test it and see if the extra code around the ad is displayed like you need.

Thanks

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.