Placing code before the closing tag

Posted in: Newspaper
Post count: 95

Please advise how to place a code just before closing </head> tag in Neawspaper theme?

Post count: 23312

Hello Renu Bakshi,

Unfortunately, I do not exactly understand what kind of code you want to add at your theme but please notice that if you want to add it to the header section of the theme, you should edit the header.php core file and insert it here -> https://www.screencast.com/t/51hQOAeS2a

Hope this helps!

Thanks for the message!

Post count: 95

Hello,

Thanks Catalin. It’s google adsense code. This is the code:

<script async src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: “ca-pub-4830297679832206”,
enable_page_level_ads: true
});
</script>

Thanks for your help.

Post count: 23312

Hello Renu,

I have inspected your Google Ad code and it’s not correct. Please keep in mind that code is Page Level Ads -> https://www.screencast.com/t/kwaeTypz
Notice that the Page level Ads implementation is not tested for our theme and we cannot say for sure if it works as properly, sorry!
For more information about page level ads implementation, please check this topic here -> https://forum.tagdiv.com/topic/page-level-ads-problems/ If your code is not working after you have followed this steps, please contact the Google because they should be able to provide a more accurate response regarding on the code.

Thanks for your understanding!

Post count: 95

Hello Catalin:

Thank you so much.

Yes, you are right it’s Google Page Level Ad Code. I mentioned this as Google adsense code due to lack of technical knowledge on my part.

I would appreciate if the readers of this post could give their experience about using Google Page Level Code in Newspaper theme.

I have another site made on Genesis framework. It has option to put code in a section in their theme penal, which get placed in header section. I put the page level code there and it’s working absolutely fine.

Regards…

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