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:


]]></b:skin>


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{
font-size:12px;
color:#222;
display:block;
height:22px;
line-height:22px;
margin-bottom:16px;
padding-left:32px;
}
.ads-right-min a:hover,
.bottom-share-links a:hover{color:#666;}
.mini-tech{background:url(http://lh6.ggpht.com/_TqPdHmAEwTM/SrVsIDBoz7I/AAAAAAAAFqw/UpGK_0UQUZg/technorati.gif) no-repeat;}
.mini-facebook{background:url(http://lh4.ggpht.com/_TqPdHmAEwTM/SrXQ3G_uRnI/AAAAAAAAFq0/ktY0xwRy4Oo/fb.gif) no-repeat;}
.mini-tweet{background:url(http://lh5.ggpht.com/_TqPdHmAEwTM/SrVkkLNvMlI/AAAAAAAAFqs/S-UYpTlrZa8/tweet.gif) no-repeat;}
.mini-del{background:url(http://lh5.ggpht.com/_So-xppeH7x0/TKfoBd8U24I/AAAAAAAAAYg/tPsrA9WLIek/s800/delicious_icon.jpg) no-repeat;}
.mini-stumble{background:url(http://lh3.ggpht.com/_So-xppeH7x0/TKfoBaa6TsI/AAAAAAAAAYo/aq2JJqtTJvQ/s800/stumbleupon%20icon.png) no-repeat;}
.mini-digg{background:url(http://lh4.ggpht.com/_So-xppeH7x0/TKfoBXGvlbI/AAAAAAAAAYk/bwSALZ7aCNY/s800/Digg_icon.png) 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%'>
<tr>
<td width='354'>
&lt;script type=&#39;text/javascript&#39;&gt;&lt;!--
google_ad_client=&quot;pub-YOUR ADSENSE CODE&quot;;
google_ad_host=&quot;pub-1556223355139109&quot;;
google_ad_width=300;
google_ad_height=250;
google_ad_format=&quot;300x250_as&quot;;
google_ad_type=&quot;text_image&quot;;
google_ad_host_channel=&quot;0001&quot;;
google_color_border=&quot;FFFFFF&quot;;
google_color_bg=&quot;FFFFFF&quot;;
google_color_link=&quot;0000FF&quot;;
google_color_url=&quot;008000&quot;;
google_color_text=&quot;000000&quot;;
//--&gt;&lt;/script&gt;
&lt;script src=&#39;http://pagead2.googlesyndication.com/pagead/show_ads.js&#39; type=&#39;text/javascript&#39;&gt;
&lt;/script&gt;
</td>
<td><div class='ads-right-min'>
<a class='mini-del' expr:href='&quot;http://del.icio.us/post?url=&quot; + data:post.url + &quot;&amp;title=&quot; + data:post.title' target='_blank' title='Add To Del.icio.us'>Add This To Del.icio.us</a>
<a class='mini-tweet' expr:href='&quot;http://twitter.com/home?status=Reading &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;http://www.facebook.com/sharer.php?u=&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;http://www.stumbleupon.com/refer.php?url=&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;http://www.technorati.com/faves?add=&quot; + data:post.url' target='_blank' title='Add To Technorati'>Add to Technorati</a>
<a class='mini-digg' expr:href='&quot;http://digg.com/submit?phase=2&amp;url=&quot; + data:post.url + &quot;&amp;title=&quot; + data:post.title' target='_blank' title='Digg This'>Digg This</a>
</div>
</td>
</tr>
</table>
</div>
</b:if>


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.

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

    ReplyDelete