How to add a Related Posts list under your blog posts

Saturday, January 7, 2012





In this post i will show you how to place a related posts widget under your blog posts.Displaying related posts under your blog posts is a great way to keep visitors to your blog - on your blog.The gadget works by displaying a list of posts that have the same label/labels as the post currently being viewed, so there is a good chance the visitors will also be interested in the related posts.To add the recent posts widget we must add two pieces of code to your blog.

Adding Related Posts To Your Blog.

1. Click 'Layout'-->'Edit html' for your blog
(Tick the expand widget templates box)

2. Find the following piece of code in your blogs hmkl:


</head>
3. Copy and paste the code below Directly Before </head>
<!--Related Posts Scripts and Styles Start-->
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<style>
#related-posts {
float:left;
text-transform:none;
height:100%;
min-height:100%;
padding-top:5px;
padding-left:5px;
}
#related-posts .widget{
padding-left:6px;
margin-bottom:10px;

}
#related-posts .widget h2, #related-posts h2{
font-size: 1.3em;
font-weight: italic;
color: black;
font-family: Georgia, &#8220;Times New Roman&#8221;, Times, serif;
margin-bottom: 0.75em;
margin-top: 0em;
padding-top: 0em;
}
#related-posts a{
color:blue;
}
#related-posts a:hover{
color:red;
}
#related-posts ul{
list-style-type:none;
margin:0 0 0px 0;
padding:0px;
text-decoration:bold;
font-size:10px;
text-color:#000000
}
#related-posts ul li{
background:transparent url(http://i941.photobucket.com/albums/ad259/spiceupyourblog/rss-1.jpg) no-repeat ;
display:block;
list-style-type:none;
margin-bottom: 13px;
padding-left: 30px;
padding-top:0px;}
</style>
<script type='text/javascript'>
var relatedpoststitle=&quot;Hey ! Here's Some Related Posts You May Like&quot;;
</script>
<script src='http://blogergadgets.googlecode.com/files/related.js' type='text/javascript'/>
</b:if>
<!--Related Posts Scripts and Styles End-->

Note: The heading is currently - 'Hey ! Here's Some Related Posts You May Like' - this can be changed as to anything you like.

Optional : Change Icon

Petrina asked in a comment can the image be changed and the answer is yes.

This is the small icon that is displayed beside every title :



This is the URL of that image :

http://i941.photobucket.com/albums/ad259/spiceupyourblog/rss-1.jpg

Simply find that URL in the code and replace it with the URL of the image you want to use.Make sure to use a small image around 16x16 to 25x25.

--

4. Now find this piece of code in your blogs html

<data:post.body/>
5. Copy and paste the following code Directly Below <data:post.body/>
<!-- Related Posts Code Start-->
<a href='http://
costumizeyourblog.blogspot.com'><img alt='Best Blogger Tips' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjL9psXmyTdHAs8RWGYcjkDo1-5fAPCyNNPz4eLtW2OlclrcvshCfYmgLDMJERHft0g4hpbKPKqGXrzjTWWKgr-5wF1hkCPpX9A384fj6tTDfVa7NGuN78xgPwdNN79nlQUMswj9cPPC4J4/s1600/best+blogger+tips.png'/></a><b:if cond='data:blog.pageType == &quot;item&quot;'>
<div id='related-posts'>
<b:loop values='data:post.labels' var='label'>
<b:if cond='data:label.isLast != &quot;true&quot;'>
</b:if>
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<script expr:src='&quot;/feeds/posts/default/-/&quot; + data:label.name + &quot;?alt=json-in-script&amp;callback=related_results_labels&amp;max-results=6&quot;' type='text/javascript'/></b:if></b:loop><a href='http://
costumizeyourblog.blogspot.com' style='display:none'>Related Posts Widget</a>
<script type='text/javascript'>
var currentposturl=&quot;<data:post.url/>&quot;;
var maxresults=5;
removeRelatedDuplicates(); printRelatedLabels();
</script>
</div>
</b:if>
<!-- Related Posts Code End For Info: costumizeyourblog.blogspot.com-->

Note: You can change the maximum amount of related posts listed its currently 6
Simply change this section above : max-results=6

Once you click save the related posts list has been added.What do you think ?
Continue Reading...

Tweet 6 Great Ways To Keep Your Blogs Archive Alive And Kicking


As our blogs grow and we add more and more content we tend to drive ahead forgetting the trail of posts we have left behind us.Yes the Blog Archive, it can be a trip down memory lane looking back at the posts we lovingly created...But should you just let your blog archive lay down and die ?

Your archive can be kept alive and can justify it's existence by bringing visitors to your blog and keeping current visitors on your blog.If you advertise on your blog with AdSense or other advertisers and sponsors you archive can keep attracting traffic from search engines, and keep earning for years.This all sounds great, but your archive cannot survive by itself it needs you to provide life support.

So in this blop tip look at 6 ways we can keep Your archives alive



1.The first is obvious but a big one simply keep your archive updated.

Obvious yet most bloggers fail to do it.When i say updated i mean a few things, once you have been blogging for a while you learn new tactics and tricks.You find the best way to present your blog posts for your readers, for S.E.O. and to look more professional.Go back through your archive and make sure your archived posts are up to standard.You don't need to do it all at once, a good way to organise this is to edit an old post every time you publish a new post.

Add some keywords relevant to your blog if they were not added when you first posted or maybe change the title to something more catchy .

2. A full site map not the default.

Adding a sitemap to Google containing all my posts not just the default site map (The one most bloggers are using) which only contains your last 26 posts.Even if you don't have 26 posts yet set it up now.

3. Related Posts.

Another obvious one that a lot of blogs have add already is a 'Related Posts' list.This is a list placed under your blog posts containing posts from your archive that are on the same topic.This will send people to your archive.
You could get the Link Within recent posts with thumbnails : Click Here


4. Re-Share them and Re-tweet them.

We all tweet our latest post on Twitter and share them on Facebook, Digg and others why don't we give our archives some life by Re-Sharing them.When you happen to find yourself on an old post give it a tweet.

5. Link to them in your latest posts.

Once your blog has 20-30 posts you should start linking back.If your a regular reader here you will notice i always have a line similar to this somewhere in my posts
"I covered this in a recent post click here to see it " or " for more info click here" ..
Yes it's all very organised my friends.
Make sure the link is set to open in a new window and make sure the post your linking to is relevant to the one your writing.


6.Analyze the stats.

This does not have to be hard and you don't need to be an expert to do it.You can add a free 'Hit Counter' to your blog that will show you which posts from your archive are getting the most hits.Learn from this information, once you know which posts are most popular you can try to work out why and use that information to edit the older posts and of course it will help you when writing new posts.However the best most in dept way to track your blogs performance is with Google Analytics.

There are lots more things you can do but remember your archive represents you and if its not up to standard it will look like your not up to standard so fix it or delete it because you cant hide it !
Continue Reading...

Add Facebook Like This Share Icon To Your Blog Posts


How to add the facebook buttons to your Blog


First up i will give you the code for the button and then we will look at were you can add the buttons in your blog posts.

Facebook Like Button Code :
<iframe allowTransparency='true' expr:src='&quot;http://www.facebook.com/plugins/like.php?href=&quot; + data:post.url + &quot;&amp;layout=standard&amp;show_faces=false&amp;width=100&amp;action=like&amp;font=arial&amp;colorscheme=light&quot;' frameborder='0' scrolling='no' style='border:none; overflow:hidden; width:450px; height:40px;'/><a href='http://costumizeyourblog.blogspot.com'><img alt='Blogging Tips And Tricks' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjL9psXmyTdHAs8RWGYcjkDo1-5fAPCyNNPz4eLtW2OlclrcvshCfYmgLDMJERHft0g4hpbKPKqGXrzjTWWKgr-5wF1hkCPpX9A384fj6tTDfVa7NGuN78xgPwdNN79nlQUMswj9cPPC4J4/s1600/best+blogger+tips.png'/></a>

Were To Place The Button


In this post we will look at three places you can add the button

*Below the post title
*At the top of the post
*Below the entire post

First go to your blogs html by following these three steps - In your dashboard click 'Layout' > 'Edit Html' > Tick the 'Expand Widget Templates' box.




To add the button directly below the post titles Find the following code in your blogs Html :
(Click Ctrl and F for a search bar to help find the code
<div class='post-header-line-1'>

Now paste the facebook button code Directly Below / Under <div class='post-header-line-1'>

To add the button at the top of the posts Find the following code in your blogs Html
(Click Ctrl and F for a search bar to help find the code
<data:post.body/>
Now paste the Facebook button code Directly Before / Above <data:post.body/>

To add the button directly below the posts Find the following code in your blogs Html :

(Click Ctrl and F for a search bar to help find the code
<data:post.body/>
Now paste the Facebook code Directly Below / Under <data:post.body/>

Once you have the Facebook code pasted were you want the button to appear and your template saved go check out your new share option.

Continue Reading...

Add The Floating Follow Me On Twitter Badge To Your Blog

Twitter is a great way to connect with the readers of your blog and find people with similar interests who you can inform about your blog.First up if you have a blog and you don't have a Twitter account you are missing out, get one now.You can get more traffic to your blog from Twitter and it's actually good fun.

Click here set up your Twitter and we can continue...Ready ?

Twitter can be as almost effective as Followers and Rss feed at keeping people connected to your blog and updated when you publish new content.When someone arrives on your blog you want to have the options for them to connect with you in prime positions.Your Rss feed link should be near the top of the page if you use followers this should have a prime position,similarly you should have a link to follow you on Twitter easily accessible.

The Follow on twitter badge we will be adding in this post is the one I'm currently using (I'm always changing this blog it may be different by the time you read this )

Here's a preview :


The image is fixed to the side of your blog and stays in position when the page is scrolled, when clicked it will open your Twitter Profile in a new window for the reader to follow you.

Lets add it to your blog

1.Click Layout-->Edit html for your blog
(Tick the 'Expand widget template' box.)








2.Find the following piece of code in the html:
(Click 'CTRL and F' for a search bar to find the code)
]]></b:skin>
3.Add the following piece of code Directly Above it :
#float_corner {
position:fixed;_position:absolute;bottom:10px;left:3px;clip:
inherit;_top:expression(document.documentElement.scrollTop+document.documentElement.clientHeight-this.clientHeight);_left:expression(document.documentElement.scrollLeft + document.documentElement.clientWidth - offsetWidth);}
Note:

This will position the image just up from the bottom left corner of the page.
You can change this just change the following attributes : bottom :left
Change them to make the image appear were you like :

-top left
-top right
-bottom left
-bottom right

You can also change 10px to move the image position up and down the page and 3px to move the image in and out from the side of the page.

4.Now find this code in your html :
</body>
5.And place this code Directly Above it :
<a href='http://costumizeyourblog.blogspot.com'><img alt='Blogging Tips And Tricks' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjL9psXmyTdHAs8RWGYcjkDo1-5fAPCyNNPz4eLtW2OlclrcvshCfYmgLDMJERHft0g4hpbKPKqGXrzjTWWKgr-5wF1hkCPpX9A384fj6tTDfVa7NGuN78xgPwdNN79nlQUMswj9cPPC4J4/s1600/best+blogger+tips.png'/></a><div id="float_corner">
<a href="ENTER YOUR TWITTER URL HERE">
<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEip8PZ4AjYE8TVhxVgZNQgNh7M4vVpBY1AnP93Akb9k9As5nTjU3tBNOKhoL5iHNPYlc7RBMz6PZVpRI_rWKvvvwfstnCZTjlZoZur4PwirBc9ezseUR_pRDbp8F77W2VwPw6bhH3qtqgNz/s1600/follow+me+on+twitter.png" border="0" /></a>
</div>
You Must change the following attribute :

ENTER YOUR TWITTER URL HERE - Replace with the address of your twitter profile.

Example: http://www.twitter.com/yummz_18

Once you have made these changes save your template and the image has been addedYou can make of find a different image and use that, if you need help with that let me know.You can follow me on Twitter here: Follow @yummz_18

Continue Reading...

Add A New Random Post List Gadget To Your Blog







Add A Random Posts Gadget To Your Blog

Step1. In your dashboard click 'Design' > 'Add A Gadget'

Step 2. Choose Html/Javascript Gadget and paste the following code into the area provided :

<a href='http://costumizeyourblog.blogspot.com.com'><img alt='Blogging Tips And Tricks' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjL9psXmyTdHAs8RWGYcjkDo1-5fAPCyNNPz4eLtW2OlclrcvshCfYmgLDMJERHft0g4hpbKPKqGXrzjTWWKgr-5wF1hkCPpX9A384fj6tTDfVa7NGuN78xgPwdNN79nlQUMswj9cPPC4J4/s1600/best+blogger+tips.png'/></a><script type="text/javascript">
var randarray = new Array();var l=0;var flag;
var numofpost=6;function randomposts(json){
var total = parseInt(json.feed.openSearch$totalResults.$t,10);
for(i=0;i < numofpost;){flag=0;randarray.length=numofpost;l=Math.floor(Math.random()*total);for(j in randarray){if(l==randarray[j]){ flag=1;}}
if(flag==0&&l!=0){randarray[i++]=l;}}document.write('<ul>');
for(n in randarray){ var p=randarray[n];var entry=json.feed.entry[p-1];
for(k=0; k < entry.link.length; k++){if(entry.link[k].rel=='alternate'){var item = "<li>" + "<a href=" + entry.link[k].href + ">" + entry.title.$t + "</a> </li>";
document.write(item);}}
}document.write('</ul>');}
</script>
<script src="/feeds/posts/default?alt=json-in-script&start-index=1&max-results=1000&callback=randomposts" type="text/javascript"></script>

Note : You can change the number in red to choose how many posts you wist to have displayed.

Step 3. Give the gadget a title, Like : 'Random Posts', 'Posts From The Archive' etc.. Save The Gadget.
Continue Reading...