Jumat, 28 November 2014

Cara Membuat Related Post Sederhana di Blog

   Ketika kita sedang mengunjungi sebuah blog, sering kali kita melihat beberapa judul postingan blog yang terkait dengan artikel/postingan blog yang sedang kita baca.

   Itulah postingan terkait atau related post. Sobat maen blogging pun bisa membuat related post seperti itu, dengan menambahkan beberapa script pada template kalian.

Berikut langkah2nya :

   - Buka akun blog anda
   - Pilih Template - Edit HTML - Lanjutkan
   - Jangan lupa centang Expand Template Widget
   - Letakkan kode berikut diatas ]]></b:skin

/* Related Post Cepat
--------------------------------- */
#related-postsku{float:left;width:100%;margin-top:5px;margin-left:0px;font-size:13px;font-family:Arial,serif;margin-bottom:0px;}
#related-postsku a{text-decoration:none;}
#related-postsku a:hover{text-decoration:none;}
#related-postsku ul{border:medium none;margin:10px 0px 10px 0px;padding:0;}
#related-postsku ul li{display:block;background:url("https://lh3.googleusercontent.com/-6iznc81V_pQ/UcmgB6yKU3I/AAAAAAAABWc/NhxmD6789YU/s25/rss.png") no-repeat 0 0;margin:0;padding-top:0;padding-right:0;padding-bottom:1px;padding-left:30px;margin-bottom:5px;line-height:2em;border-bottom:1px dotted #cccccc;}


   - Berikutnya, letakkan kode berikut di atas </head>

<-- Artikel Terkait Start Bro-->
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<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>
</b:if>
<!-- Artikel Terkait End Bro-->


   - Selamat mencoba

Budayakan Untuk Meninggalkan Komentar Meskipun Hanya Satu Huruf

4 komentar:

  1. Hello guys ,
    gabung saja di AGENS128, yang menyediakan situs bola terpercaya dan aman.
    dengan 50 ribu rupiah saja sudah bisa dapat jutaan rupiah.

    AGEN BOLA TERPERCAYA
    JUDI BOLA ONLINE
    SITUS BOLA TERPERCAYA
    AGEN SBOBET
    BANDAR PARLAY
    LIGA BOLA
    JUDI SITUS BOLA
    AGEN JUDI TERPERCAYA

    Untuk info lebih lanjut, Hubungi kami di:
    Website : https://www.linktr.ee/s128agen
    BBM : D8B84EE1 / AGENS128
    WA : 0852-2255-5128

    BalasHapus
  2. Water Hack Burns 2 lb of Fat OVERNIGHT

    More than 160000 men and women are using a easy and secret "liquids hack" to burn 2 lbs each night in their sleep.

    It is painless and it works every time.

    This is how you can do it yourself:

    1) Grab a clear glass and fill it half full

    2) And then do this proven HACK

    and be 2 lbs skinnier as soon as tomorrow!

    BalasHapus
  3. Did you realize there's a 12 word phrase you can communicate to your crush... that will induce deep feelings of love and instinctual attraction for you deep inside his chest?

    That's because deep inside these 12 words is a "secret signal" that triggers a man's impulse to love, please and guard you with all his heart...

    ===> 12 Words Will Trigger A Man's Desire Impulse

    This impulse is so hardwired into a man's brain that it will drive him to try harder than before to build your relationship stronger.

    In fact, fueling this all-powerful impulse is so binding to having the best possible relationship with your man that the instance you send your man one of these "Secret Signals"...

    ...You'll immediately notice him open his mind and heart for you in such a way he never expressed before and he'll identify you as the only woman in the world who has ever truly tempted him.

    BalasHapus
  4. ga work gan. cssnya juga ga bisa d apa2in...
    cek aja
    https://musikhade.blogspot.com/

    BalasHapus