Renew - Best Practices for implementing Google Adsense Ad Code

Hello Friends,

We would like to implement Google Adsense ad code in 3 areas.

  1. Within the header of our content (posts)
  2. Within the content itself
  3. Within the footer (above comments)

We would want to implement Google Adsense responsive ad code.

What would be your recommendation for implementing this into the theme? Should we use a plugin? Should we customized tags or smart code and embed into each post? Do you have some examples of how others have approached this challenge?

Many thanks!

Hi Tom,

Thanks for reaching out.

If you’re on Pro then you can simply add the Adsense code within the pro header and footer builder’s text element, or content area element. Then assign that header or footer to the posts.

Then you can use the content builder text element for the Adsens code too.

And as for above comment area, that would require template customization as it needs to be added to comment template. Or simply use the_content filter to add it, the problem is it may break the builder. Hence, it’s more recommended to do it directly to the template.

And if you’re on X theme, then you have to customize the template too since it has no header and footer builder. Maybe I could provide some instruction if you can provide more information on which part of the header, footer, content it must be displayed. The template has sub-templates so it must be specific. But to give you an idea of template editing then please check these

https://theme.co/apex/forum/t/customizations-best-practices/205,
https://theme.co/apex/forum/t/how-to-upload-xtheme-to-child-theme/43246/2,

Thanks!

Thanks for the reply! Does Pro provide advanced features to X? Meaning can you use the same theme but with customization? Does having a custom theme cause issues with future updates of the core theme?

Hi Tom,

Yes, Pro has more advanced feature for header, footer, and design cloud than X. Both Pro and X are core theme, updates are given to each and it doesn’t or shouldn’t affect each other. You’ll have to install a child theme for each, like x-child or pro-child. Anything you add to its child theme counterpart will not be overwritten by updates.

Thanks!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.