How to Create Related Posts Widget V2


Yesterday there was a friend who asked me, 'how do I make a widget related posts as I use on this blog. " Actually I create a widget related posts I've been posting on this blog, it's just the version related posts that I use now is different from theversion related posts that have been posted on this blog. Therefore, in this post I will explain how to create related posts as I use on this blog or that I gave the namerelated posts v2 . 


Maybe you will ask what is the difference between v1 and v2 related posts? If the v1 related posts , related posts will be shown along with titles grouped by label and label each. For example, consider the following screenshot. while version 2, related posts or Articles related to only display post titles alone (without title label) and all related articles merged into one so Similar to the related posts widget belongs to WordPress. An example looks like this:

 For those of you who want to install related posts or related posts wordpress v2 style please follow the steps below: 

1. On page dashboard blogger, go to Design -> Edit HTML 
2. You can check the "Expand Widget Templates" 
3. Find the code ]]> </ b: skin> 
4. Put the code below css thereon







related posts widget










# Related-posts { float: left; width: 250px; margin-left: 5px; font-size: 12px; line-height: 1.8em; margin-bottom: 10px; # related-posts a { color: # 4b4b4b; 
# related-posts a: hover { 
color: # ca1717; 
# related-posts. widgets { list-style-type: none; margin: 0 5px 5px 0;padding: 0; # related-posts. widgets h2, # related-posts h2 { font-size: 20px; font-weight: normal; margin: 5px 7PX 0; padding: 0 0 5px; # related-posts a { text-decoration : none; # related-posts a: hover { text-decoration : none; # related-posts ul { margin: 10px 5px 5px 20px; padding: 0; }
5. Then look up </ head>

6. Put the code javascript follows thereon 

<Script src = 'http://hbhost.googlecode.com/files/Related-posts.js' type =' text / javascript '/>
7. Then find <p> <data:post.body/> </ p> or <data:post.body/>

8. If there are two codes are the same, choose the first 9. Put the code follows below



<b:if cond='data:blog.pageType == "item"'>
<div id='related-posts'>
<div style='font-size:18px'> <b> Related Posts: </ b > </ div>
<b:loop values='data:post.labels' var='label'>
<b:if cond='data:label.isLast != "true"'/>
<b: if cond = 'data: <b:if == "item"'>
<script expr: src = '"/ feeds/posts/default/- /" + data: label.name + "? alt = json-in-script & callback = related_results_labels & max-results = 5"'type =' text / javascript '/> </ b: if>
</ b: loop>
<script type = 'text / javascript '> removeRelatedDuplicates (): printRelatedLabels ();
</ script>
</ div>
</ b: if>
Description:
The text in bold is the title of the widget and the number 5 is the number of posts that Appear in the related posts. Please replace as Desired 10. If it is, save your template and see the results. If it works do not forget to push the button like below

2 comments:

  1. hehehe.. akhirnya saya bisa buat artikel terkait. terima kasih, Mas

    ReplyDelete
  2. work sob di blog ane...keren nihh!

    ReplyDelete