Adding Google AdSense Under Comments

Let’s start by putting this code in your screen.css All I did was co-opt the flickr code and renamed it for google ads for comments.

/* Google Ads Under Comments */

#googleads {
padding: 10px 0;
border-bottom: 10px solid #f1f1f1;
}
#googleads #googleads {
padding: 0 15px;
text-align: center;
}
#googleads #googleads a img {
margin: 0 5px;
padding: 4px;
border: 1px solid #eee !important;
}
#googleads #googleads a:hover img {
background: #e33258;
}

Now let’s add this code right at the top of your comments.php (You need a Google AdSense account to put in the publisher number.)

<div align="center">
<div id="googleads">
<script type="text/javascript"><!--
google_ad_client = "pub-XXXXXXXXXX";
/* Comments Ad 468x60, created 2/4/09 */
google_ad_slot = "XXXXXXXXXX";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
</div>

This is a quick and dirty way of doing it but it should work.

Any questions just let me know.

About Marco

I'm a WordPress Enthusiast and share what I learn about theme's plugins, code and reviews of everything WordPress

One Comment

  • April 27, 2009 | Permalink |

    Very nice tips.

    I was wondering if you have see this issue with this theme or not… i am constantly getting

    http://completeurl.com/category/x.gif = 404

    i am receiving alot of 404 hits i don’t know if there is something wrong with the theme or some plugin though i found out there is x.gif in the script folder of the theme.

    Any ideas on this ?

Leave a comment

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Your email is never shared. Required fields are marked *

You Might Also Like

Plugins »

WP125 Ad Management Plugin

Fri, Feb 27 2009 No Comments
WP125 Ad Management Plugin

With over 13,000 thousand downloads this plugin is hardly a secret but better than a secret is the fact that it works right out of the box. Its great for... 

Tools and Links »

Forums For Your Website

Fri, Feb 20 2009 No Comments
Forums For Your Website

I wanted to add a forum to this site so I decided to browse what was available and suitable for my needs. First I’m looking for something that’s...