• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Addind AdSense Ads to my forum

#1
I am struggling to add an AdSense advert to my website;
I have even tried using AdManager yet that doesn't work for me.

Any help on how to add an AdSense Ad would be greatly appreciated!

I have the Ad code, just it doesn't work!
 

Jake Bunce

XenForo moderator
Staff member
#2
The question is, where do you want the ad displayed? There are "ad" templates for this, depending on the desired location. For example:

Admin CP -> Appearance -> Templates -> ad_header
 
#4
I got 'Leaderboard' ad-code from AdSense and I added it in the 'above_bottom_breadcrumb' template and nothing would change.
I just want a 'Leaderboard' ad at the bottom of every page.
 

Jake Bunce

XenForo moderator
Staff member
#5
I got 'Leaderboard' ad-code from AdSense and I added it in the 'above_bottom_breadcrumb' template and nothing would change.
I just want a 'Leaderboard' ad at the bottom of every page.
View the source code of the page to make sure your code is present. If it's not present then maybe you are editing a different style than you are viewing. If it is present then maybe the code just isn't rendering for some reason. It can be normal for Adsense not to display a banner all the time.
 

craigiri

Well-known member
#6
Make sure you put it between divs like this:

Code:
<div style="text-align: center;">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-351******1623";
/* Forum Channel footer */
google_ad_slot = "*********";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
Also, test the block first just by putting some text in there....instead of the google code. It should show up