Don't miss

Putting Adsense and Social Bookmarks at the Top of Every Blog Post

One of the best places to put adverts is at the top of the blog post. I will show you how to put a adsense advert and social bookmarking buttons at the top of every blog post you will ever do. To see what this looks like, check it out on my blog posts, which is what it will look like on your blog. This can be used with any website blog publishing that supports changing the HTML code of the blog such as blogger and word press.

In all honesty, this is extremely easy considering the ads will appear in every blog post of yours. Firstly, like always, back up your template or html code so if you do make mistakes you can reverse them. Now, your rock and roll to go.

1. Start off by (for blogger), clicking on design then edit html. Press control + f to find the above code easily:


2. Now copy this code just above the code shown in step 1:

.ads{margin-bottom:10px; border-top:solid 1px #DEDEDE; padding-top:10px; font-size:13px;}
.ads-right-min{border-left:solid 1px #DEDEDE; height:250px; padding-left:10px;}
.ads-right-min a:link,
.ads-right-min a:visited,
.bottom-share-links a:link,
.bottom-share-links a:visited{
.ads-right-min a:hover,
.bottom-share-links a:hover{color:#666;}
.mini-tech{background:url( no-repeat;}
.mini-facebook{background:url( no-repeat;}
.mini-tweet{background:url( no-repeat;}
.mini-del{background:url( no-repeat;}
.mini-stumble{background:url( no-repeat;}
.mini-digg{background:url( no-repeat;}

You should now temporarily save your template.

3. Click on the 'expand widgets' button and search again using control + f with the next following code:

<div class='post-body entry-content'>

4. Place the following code just below the code mentioned in step 3. Remember to change "YOUR ADSENSE CODE" (highlighted in yellow) to your adsense account publisher ID (found in the top right corner of adsense home page:

<b:if cond='data:blog.pageType == &quot;item&quot;'>
<div class='ads'>
<table border='0' cellpadding='0' cellspacing='0' width='100%'>
<td width='354'>
&lt;script type=&#39;text/javascript&#39;&gt;&lt;!--
google_ad_client=&quot;pub-YOUR ADSENSE CODE&quot;;
&lt;script src=&#39;; type=&#39;text/javascript&#39;&gt;
<td><div class='ads-right-min'>
<a class='mini-del' expr:href='&quot;; + data:post.url + &quot;&amp;title=&quot; + data:post.title' target='_blank' title='Add To'>Add This To</a>
<a class='mini-tweet' expr:href='&quot; &quot; + data:post.title + &quot; &quot; + data:post.url' target='_blank' title='Post this article on Twitter'>Tweet/ReTweet This</a>
<a class='mini-facebook' expr:href='&quot;; + data:post.url + &quot;&amp;title=&quot; + data:post.title' target='_blank' title='Share On Facebook'>Share on Facebook</a>
<a class='mini-stumble' expr:href='&quot;; + data:post.url + &quot;&amp;title=&quot; + data:post.title' target='_blank' title='Stumble This'>StumbleUpon This</a>
<a class='mini-tech' expr:href='&quot;; + data:post.url' target='_blank' title='Add To Technorati'>Add to Technorati</a>
<a class='mini-digg' expr:href='&quot;;url=&quot; + data:post.url + &quot;&amp;title=&quot; + data:post.title' target='_blank' title='Digg This'>Digg This</a>

5. Your done! So, save your template and check it out in your blog posts!

About Will Green

A student in England studying Automotive Engineering with Motorsport, Will created Ask Will Online back in 2010 to help students revise and bloggers make money. You can follow AskWillOnline via @AskWillOnline.

4 comments so far:

  1. I'm sorry but as I use Blogger I will provide HTML optimization for blogger websites. onky. However, general blogging tips will be useful for both blogger and word press users.

  2. i always use onle Blogger, so thank you very much, the info exactly I was looking for!