Welcome to my blog and I will give you the latest knowledge-information-"warning" if you want to copy and paste you have to include my link  
Topics :

Sunday, April 28, 2013

How to Make Related Post (Related Post) Under Posts


A related article is a link or url grouped and related or linked to each other and can even be a topic.

so in the related articles script will not work properly if you do not love your post Label.apa are associated with Seo? If I think there is clearly due Url structure which is derived from Article

Related on Blogspot is valid Url with its anchor text.
Not being labeled.
even if the blog visitors click the address has the same target.

Google was also made ​​under Article terkait.lihat if we typed phrases or words in the search form below itself certainly appeared a related article.
This is just an opinion, so when one of my friend I apologize.
It is a step we have to do to Make Related Articles on Blogspot. 1.Login to blogger (Better Back-up your template first so if you later again failed to live Upluad)


To do please follow the steps.
    
 Log into your Blogger account
     
Click the Template, Do not forget Buddy Backup template first just in case if my friend misplaced.
    Click the Edit HTML >> in the HTML box >> press Ctrl + F on your keyboard
     
    Find the code </ head>
         Add the following code right above or before
  •  </head>
    <script type="text/javascript">
    //<![CDATA[
    var relatedTitles = new Array();
    var relatedTitlesNum = 0;
    var relatedUrls = new Array();
    function related_results_labels(json) {
    for (var i = 0; i < json.feed.entry.length; i++) {
    var entry = json.feed.entry[i];
    relatedTitles[relatedTitlesNum] = entry.title.$t;
    for (var k = 0; k < entry.link.length; k++) {
    if (entry.link[k].rel == 'alternate') {
    relatedUrls[relatedTitlesNum] = entry.link[k].href;
    relatedTitlesNum++;
    break;}}}}
    function removeRelatedDuplicates() {
    var tmp = new Array(0);
    var tmp2 = new Array(0);
    for(var i = 0; i < relatedUrls.length; i++) {
    if(!contains(tmp, relatedUrls[i])) {
    tmp.length += 1;
    tmp[tmp.length - 1] = relatedUrls[i];
    tmp2.length += 1;
    tmp2[tmp2.length - 1] = relatedTitles[i];}}
    relatedTitles = tmp2;
    relatedUrls = tmp;}
    function contains(a, e) {
    for(var j = 0; j < a.length; j++) if (a[j]==e) return true;
    return false;}
    function printRelatedLabels() {
    var r = Math.floor((relatedTitles.length - 1) * Math.random());
    var i = 0;
    document.write('<ul>');
    while (i < relatedTitles.length && i < 20) {
    document.write('<li><a href="' + relatedUrls[r] + '">' +
    relatedTitles[r] + '</a></li>');
    if (r < relatedTitles.length - 1) {
    r++;
    } else {
    r = 0;}
    i++;}
    document.write('</ul>');}
    //]]>
    </script>
    Then find the code <data:post.body/>
    Add the following code after or under the code <data:post.body/>


<b:if cond='data:post.labels'>
    <b:loop values='data:post.labels' var='label'>
    <b:if cond='data:blog.pageType == "item"'>
    <script expr:src='"/feeds/posts/default/-/" + data:label.name + "?alt=json-in-script&amp;callback=related_results_labels&amp;max-results=5"' type='text/javascript'/>
    </b:if>
    </b:loop>
    </b:if>

    <b:if cond='data:blog.pageType == "item"'>
    <h4>Artikel Menarik Lainnya</h4>
    <script type="text/javascript">
    removeRelatedDuplicates();
    printRelatedLabels();
    </script>
    </b:if>
  • last Save.
  • The green to be my friend change as much.
If there is an error that the code </div> highlighted, then just add the code </ b: if>
So later will be
<b:if cond='data:post.labels'>
    <b:loop values='data:post.labels' var='label'>
    <b:if cond='data:blog.pageType == "item"'>
    <script expr:src='"/feeds/posts/default/-/" + data:label.name + "?alt=json-in-script&amp;callback=related_results_labels&amp;max-results=5"' type='text/javascript'/>
    </b:if>
    </b:loop>
    </b:if>

    <b:if cond='data:blog.pageType == "item"'>
    <h4>Artikel Menarik Lainnya</h4>
    <script type="text/javascript">
    removeRelatedDuplicates();
    printRelatedLabels();
    </script>
    </b:if> </b:if>
 Sekian tutorial tentang How to Make Related Post (Related Post) Under Postsyang bisa saya share untuk sobat semua. Terima kasih.
See You Next Post
This entry was posted in :

0 comments:

Post a Comment

Categories

Blog Archive

Translate