<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Forum home header large -->
<ins class="adsbygoogle"
style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-255xxxxxxxx"
data-ad-slot="797xxxxxxx"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
As it states in the resource description:
What follows below are examples using standard AdSense code.
Google have very recently introduced asynchronous AdSense code - see here for how to implement that: http://xenforo.com/community/resources/responsive-adsense.2084/update?update=5334
<xen:hook name="ad_below_content" /><center><script type="text/javascript"><!--
google_ad_client = "ca-pub-255xxxxxxxx";
width = document.documentElement.clientWidth;
/* below content - forum 2 */
google_ad_slot = "16xxxxxxx";
google_ad_width = 300;
google_ad_height = 45;
if (width > 483) {
/* below content - forum 1 */
google_ad_slot = "16xxxxxxxx";
google_ad_width = 525;
google_ad_height = 60;
}
if (width > 743) {
/* below content - forum */
google_ad_slot = "16xxxxxxxx";
google_ad_width = 728;
google_ad_height = 90;
}
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></center><br />
<xen:hook name="ad_above_top_breadcrumb" /><br />
<center><script type="text/javascript"><!--
google_ad_client = "ca-pub-25xxxxxxx";
width = document.documentElement.clientWidth;
/* Forum home header large 2 */
google_ad_slot = "79xxxxxx";
google_ad_width = 300;
google_ad_height = 45;
if (width > 483) {
/* Forum home header large 1 */
google_ad_slot = "79xxxxxxxx";
google_ad_width = 525;
google_ad_height = 60;
}
if (width > 743) {
/* Forum home header large */
google_ad_slot = "79xxxxxxxx";
google_ad_width = 728;
google_ad_height = 90;
}
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></center><br />
<xen:hook name="ad_above_top_breadcrumb" /><br />
<center><script type="text/javascript"><!--
google_ad_client = "ca-pub-25xxxxxxxxx";
width = document.documentElement.clientWidth;
/* Forum home header large 2 */
google_ad_slot = "79xxxxxxxx";
google_ad_width = 300;
google_ad_height = 45;
if (width > 483) {
/* Forum home header large 1 */
google_ad_slot = "79xxxxxxxx";
google_ad_width = 525;
google_ad_height = 60;
}
if (width > 743) {
/* Forum home header large */
google_ad_slot = "79xxxxxx";
google_ad_width = 728;
google_ad_height = 90;
}
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></center><br />
In order to avoid breaching Google's ToS for AdSense, certain pages should not have ads displayed on them.
This includes error pages, for example: http://cliptheapex.com/error
This can be achieved by using a standard conditional statement like so:
Rich (BB code):<xen:if is="!in_array({$contentTemplate}, array('', 'message_page', 'error', 'search_form', 'search_form_post', 'search_form_profile_post', 'search_results',...
Where is the code input for the error page?Brogan updated Responsive AdSense with a new update entry:
Prevent advertisements from being displayed on specific pages
Read the rest of this update entry...
<xen:if is="!in_array({$contentTemplate}, array('', 'message_page', 'error', 'search_form', 'search_form_post', 'search_form_profile_post', 'search_results',...
<style>
.footer { width: 320px; height: 50px; }
@media(min-width: 500px) { .footer { width: 468px; height: 60px; } }
@media(min-width: 800px) { .footer { width: 728px; height: 90px; } }
</style>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- footer -->
<ins class="adsbygoogle footer"
style="display:inline-block"
data-ad-client="ca-pub-2556590227571531"
data-ad-slot="6672415453"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<center><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-6026720746799933"
data-ad-slot="3141788004"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script></center>
You forgot contact page.Brogan updated Responsive AdSense with a new update entry:
Prevent advertisements from being displayed on specific pages
Read the rest of this update entry...
<xen:if is="!in_array({$contentTemplate}, array('', 'message_page', 'error', 'search_form', 'search_form_post', 'search_form_profile_post', 'search_results', 'register_form', 'login', 'error_with_login', 'contact'))">
Ad code here
</xen:if>
Brogan updated Responsive AdSense with a new update entry:
Prevent advertisements from being displayed on specific pages
Read the rest of this update entry...
Hoping someone scan help - When adding the code below content (footer) it breaks my footer. Here is the code i am using.
Code:<style> .footer { width: 320px; height: 50px; } @media(min-width: 500px) { .footer { width: 468px; height: 60px; } } @media(min-width: 800px) { .footer { width: 728px; height: 90px; } } </style> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- footer --> <ins class="adsbygoogle footer" style="display:inline-block" data-ad-client="ca-pub-2556590227571531" data-ad-slot="6672415453"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script>
View attachment 63980
Yes I know @mistypants helped me figure this one out! She is awesome!You can't name your ad banner "footer". If you do, change the areas in your code that do say "footer" to another name because there is already a default class named footer.
We use essential cookies to make this site work, and optional cookies to enhance your experience.