Related Posts Style

Assalamualaikum. Bersama Muhammad Rizki Fadillah seperti biasa kita akan membahas seputar modifikasi template. Anda tentu tahu related posts. Related posts digunakan untuk menampilkan postingan yang berkaitan dengan artikel yang sedang dibuka. Related posts bisa membuat pengunjung blog betah dengan membuat mereka penasaran dengan postingan di blog anda. Cara membuat related posts pernah dibuat oleh Mas Doyok. Nah, kali ini kita juga akan membuat related posts, namun dengan style yang lebih aduhai. Seperti ini.
Indahnya, indahnya, aduhai... Manisnya, manisnya, aduhai... Saat-saat memadu cinta, saat-saat yang paling indah... Kata-kata bak mutiara, kata-kata dalam bercinta...

Waduh, kok jadi nyanyi sih? Okelah kalo begitu, okelah kalo begitu... okelah kalau begitu... okelah kalo begitu... kita mulai tutorialnya...

Ayo kita mulai.

1. Login ke Blogger, lalu klik Tata Letak > Edit HTML.

2. Backup dulu template anda.

3. Centang checkbox Expand Template Widget.

3. Cari kode:
]]></b:skin>
4. Taruh kode berikut diatasnya.
/* Kode CSS untuk Artikel Terkait */
#underpost{
font-family:Arial, Tahoma, Verdana, Sans-serif;/* Jenis font. */
font-size:small;/* Ukuran font. */
color:#0080FF;/* Warna teks. */
background:#81BEF7;/* Warna latar belakang. */
clear:both;
float:left;
width:410px;/* Lebar area artikel terkait. Sesuaikan dengan lebar main-wrapper (kolom posting) anda. */
-moz-border-radius:10px;
border:0;
height:auto;
margin:0 auto;
padding:10px;
}
#underpost h2{
font-family:'Trebuchet MS',Trebuchet,Arial,Verdana,Sans-serif;/* Jenis font heading. */
font-size:large;/* Ukuran font heading. */
color:#0080FF;/* Warna teks heading. */
margin-bottom:5px;
border-bottom:1px solid #0080FF;/* Warna garis pembatas dibawah teks heading. */
padding:0 0 5px;
}
#underpost a,#underpost a:link,#underpost a:active,#underpost a:visited{
color:#0B243B;/* Warna link */
text-decoration:none;
}
#underpost a:hover{
text-decoration:underline;
}
#artikel-terkait{
overflow:auto;
width:auto;
height:400px;/* Tinggi dari artikel terkait */
padding:10px;
}
5. Cari kode:
<p><data:post.body/></p>
6. Masukkan kode berikut dibawah kode diatas.
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<div id='underpost'>
<div class='similiar'>

<div class='widget-content'>
<h2>Artikel Menarik Lainnya</h2>
<div id='artikel-terkait'>
<div id='relposts'/><br/><br/>
<script type='text/javascript'>

var homeUrl3 = &quot;<data:blog.homepageUrl/>&quot;;
var maxNumberOfPostsPerLabel = 4;
var maxNumberOfLabels = 10;

maxNumberOfPostsPerLabel = 100;
maxNumberOfLabels = 3;


function listEntries10(json) {
var ul = document.createElement(&#39;ul&#39;);
var maxPosts = (json.feed.entry.length &lt;= maxNumberOfPostsPerLabel) ?
json.feed.entry.length : maxNumberOfPostsPerLabel;
for (var i = 0; i &lt; maxPosts; i++) {
var entry = json.feed.entry[i];
var alturl;

for (var k = 0; k &lt; entry.link.length; k++) {
if (entry.link[k].rel == &#39;alternate&#39;) {
alturl = entry.link[k].href;
break;
}
}
var li = document.createElement(&#39;li&#39;);
var a = document.createElement(&#39;a&#39;);
a.href = alturl;

if(a.href!=location.href) {
var txt = document.createTextNode(entry.title.$t);
a.appendChild(txt);
li.appendChild(a);
ul.appendChild(li);
}
}
for (var l = 0; l &lt; json.feed.link.length; l++) {
if (json.feed.link[l].rel == &#39;alternate&#39;) {
var raw = json.feed.link[l].href;
var label = raw.substr(homeUrl3.length+13);
var k;
for (k=0; k&lt;20; k++) label = label.replace(&quot;%20&quot;, &quot; &quot;);
var txt = document.createTextNode(label);
var h = document.createElement(&#39;b&#39;);
h.appendChild(txt);
var div1 = document.createElement(&#39;div&#39;);
div1.appendChild(h);
div1.appendChild(ul);
document.getElementById(&#39;relposts&#39;).appendChild(div1);
}
}
}
function search10(query, label) {

var script = document.createElement(&#39;script&#39;);
script.setAttribute(&#39;src&#39;, query + &#39;feeds/posts/default/-/&#39;
+ label +
&#39;?alt=json-in-script&amp;callback=listEntries10&#39;);
script.setAttribute(&#39;type&#39;, &#39;text/javascript&#39;);
document.documentElement.firstChild.appendChild(script);
}

var labelArray = new Array();
var numLabel = 0;

<b:loop values='data:posts' var='post'>
<b:loop values='data:post.labels' var='label'>
textLabel = &quot;<data:label.name/>&quot;;

var test = 0;
for (var i = 0; i &lt; labelArray.length; i++)
if (labelArray[i] == textLabel) test = 1;
if (test == 0) {
labelArray.push(textLabel);
var maxLabels = (labelArray.length &lt;= maxNumberOfLabels) ?
labelArray.length : maxNumberOfLabels;
if (numLabel &lt; maxLabels) {
search10(homeUrl3, textLabel);
numLabel++;
}
}
</b:loop>
</b:loop>
</script>
</div>
</div>

</div>
</div>
</b:if>
7. Klik Simpan Template.

Silakan lihat blog anda. kini pada postingan anda sudah ada artikel terkait yang berkaitan dengan artikel yang sedang dibuka pengunjung.

Selamat mencoba!

Komentar

  1. PertAmaxxxxxx
    Wah menraik mas doy...... kayak punya rizky tuh ya?? mantap dah!!

    BalasHapus
  2. makasih mas rizki, tampilan related post yang menarik..

    BalasHapus
  3. @7303677350137100347.0

    Yang bikin post ini memang saya, dan artikel terkaitnya pun seperti yang di blog saya...

    BalasHapus
  4. Wahhh... keren nich... coba dulu ahhh...

    BalasHapus
  5. wah idget yang menarik dan saya sudah memakainya..
    terimakasiih atas ilmunya pasti berguna sekali bgai yang lain..

    salam blogger :D

    BalasHapus
  6. cantik jadinya ya,,keren abis,,oke leh keleu begitu,oke lah kalau begitu,,oke lah kalau begitu

    BalasHapus
  7. keren ini aq dah lihat, tp blog q juga dah tak pasang

    BalasHapus
  8. @7303677350137100347.0
    kebetulan ini memang psot mas rizki akhatam :D

    BalasHapus
  9. @rizki
    makasih ya
    kebetulan ada yg request ini :D

    BalasHapus
  10. @rizky
    sama sama rizky
    mungkin jadi sama seleranya :D

    BalasHapus
  11. @berita
    makasih yah mas kunjungannya :D

    BalasHapus
  12. @good
    oke monggio dicoba semoga bermanfaat ya kang

    BalasHapus
  13. @local
    oke lah kalau begitu mas
    widget ini memang yg palig perlu termasuknya
    jadi kebanayakn udah pada pake :D

    BalasHapus
  14. @rock
    oke monggo dicoba saja ya
    semoga bermanfaat ya

    BalasHapus
  15. @blogging
    iya mas :D
    dan muat banyak :D
    makasih ya

    BalasHapus
  16. info yang menarik mas doy, tapi aku lebih suka yang seperti di tempatku mas

    BalasHapus
  17. Kayak punyanya Bang Albri ( Ateonsoft.Com ) yach.. :D

    BalasHapus
  18. OKELAH KALO BEGITU....
    mantep mas infonya, langsung dipraktekin n disedot ilmunya.
    thanks n tetap semangat

    BalasHapus
  19. Wah,,, ada cara baru rupanya!!
    Trima kasih banget mas....!!

    BalasHapus
  20. wah keren mas ini yang saya cari aduhaaiiiiiiiiiii baget deh pokoknya

    BalasHapus
  21. @beben
    semoga bermanfaat aja kang

    BalasHapus
  22. @pep
    makasih ya dukungan komentarnya

    BalasHapus
  23. @sport
    ke TKp dulu
    soalnya jadi penasaran

    BalasHapus
  24. @oemar
    wah malah belum cek kesana nih bang oemar :D

    BalasHapus
  25. @tova
    makasih kunjugnan support dan komentarnya
    salam blogging mas

    BalasHapus
  26. @201
    monggo dicoba saja :D
    semoga berhasil

    BalasHapus
  27. @dogan
    monggo alngsugn dipake saja ya :D

    BalasHapus
  28. punya nya mas doyok ini saya juga cukup senang.. :)

    BalasHapus
  29. wah mantap tutornya mas...
    langsung coba ah...

    BalasHapus
  30. @van
    semoga sukses ya van :D
    makasih kunjungannya

    BalasHapus
  31. @sec
    kalau saya gak senang gak tak petahankan kakve :D

    BalasHapus
  32. hohoho.. latar belakang lombok gmana..? mau ikutan bikin sinetron disana..??? hahahahaha!

    BalasHapus
  33. @secan
    dua gigi di pantai senggigi
    kayak FTV SCTV kekeke

    BalasHapus
  34. lebih menarik yang ini,,
    makasih mas..

    BalasHapus
  35. @asbak
    monggo mas dicoba saja
    semoga bermanfaat

    BalasHapus
  36. @aan
    sip monggi dicoba
    semoga mantep

    BalasHapus
  37. Indah memang. nambah admin baru ya? jd fresh terus krn sering update.

    BalasHapus
  38. bagus Mas Doyok... jadi ngga ngebosenin tampilannya... makasih Mas...

    BalasHapus
  39. @seput
    monggo dicoba saja
    semoga bermanfaat ya

    BalasHapus
  40. @indah
    iya nih mbak :D
    makasih a kunjungannya

    BalasHapus
  41. aku juga pernah dapat tutorial membuat related post dari mas doyok, makasih mas doyok dan kang rizki

    BalasHapus
  42. makasih info nya, sekarang aku lagi males gonta ganti template

    BalasHapus
  43. panjang sekalee kode html-nya. Tapi hasilnya MANTABB!!

    BalasHapus
  44. seperti biasa
    Saya copy dulu belum sempat di coba maklum abis ganti kulit
    (Snake MOde = ON )

    BalasHapus
  45. Mantap... ini yang kucari. Lengkap dengan scroll kan ini mas Doy? Tapi kerjanya entar pulang sekolah, ntar dimarahin kepsek kalo ngeblog di kelas hehehehe...

    BalasHapus
  46. Keren abis tutorialnya.... izin untuk mencoba..........

    BalasHapus
  47. kalau yang dimasukan itu berdasarkan nama bisa tidak? bukan dari label. dan kalau berdasarkan label, yang ditampilan acak ada nggak ? bukan dari yang baru" aja.

    BalasHapus
  48. @achie
    kalau berdasar label tapi acak bisa aja :D
    coba
    ke >>> http://lesehanwae.co.cc

    BalasHapus
  49. @didiet
    semoga sukses saja mas :D

    BalasHapus
  50. @5294604699545866234.0
    pengejn lihat kulit barunya nih mas :D

    BalasHapus
  51. @parent
    ya :D
    kalau mau mantep harus berpanjang ria :D

    BalasHapus
  52. @sarif
    ini gak ganti cuma modif aja kan :D

    BalasHapus
  53. @denad
    yg dulu gak pake scroll :D

    BalasHapus
  54. they, however, give off unimaginable faculty. links of london charms The key is how to decide properly. The shape of links of london charms Earrings is connected to one’s face mold. People with triangular charms bracelets face are not apposite to bear long Links Of London Earrings with pendants links of london womens watches while studs in around identity can proffer a substance of coordination. links of london watch uk If you have an oval face, you can erode Links Of London Earrings in any style. cheap links of london rings Please never try too long, too small or too big ones. Round-faced people should links of london rings sale avoid bearing small or oblate Links Of London Earrings, links of london necklaces which can make face look longer. If you have a slim feature, links of london earrings you can costume small Links Of London Earrings with delicate design. Links of london Chains Londonlinksreplica.com is your best Links of London Jewelery online mass where a great variety of are provided at hot charge.

    BalasHapus
  55. Study the fine art of attraction: The desires of the opposite sex is a subject that requires extensive research. moncler Once the desires of a man are correctly identified you will know what will attract him. moncler Boutique Be subtle in your approach as men feel intimidated and instantly turned off by the bulldozing and indiscretion. moncler prix Men are born to be the hunters and woman the hunted-keep it that way and a man will feel much more wanted and attracted with a woman answering his call discreetly. moncler soldes No chemistry, no passion: Pay attention to chemistry. If there is no chemistry between you and the guy you are just wasting your time. moncler paris Without that sparks from both sides, there will be no basis to build anything on. doudoune homme Don't let your desire in wanting the man over shadow your common sense. moncler polo Attraction cannot be created, its something that occurs naturally and we all know anything that is forced or made-up will never have the strength and commitment to sustain. moncler veste Confidence shows : Men love confident woman. Confidence shows even before a person utters a single word. Tell him what you want and where you are going during your conversations. This will give him insight into your goals and ambitions. moncler doudoune He will imminently know he is not dealing with an air head and the attraction will increase. Independence with a hint of naivety most probably tops the charts in terms of ways to attract a man. moncler homme Don't be over confidant. This is usually a method of covering up an inferiority complex. Woman with inflated ego's and unrealistic goals are super turn off's.

    BalasHapus
  56. thomas sabo bracelet Some basic considerations can help a person to get the right par of shoes. Below are some of the important points that one may need to think about before getting the shoes. thomas sabo bracelets Style is not that important - majority of the people choose their tennis shoes considering only brand names and its looks. discount thomas sabo bracelet They don`t keep the importance of their feet up front most of the times. It can be a little hard to give up an awesome looking pair of shoes that matches your personality cheap thomas sabo bracelet But when it comes to the usage, they should be chosen based on their functionality. The tennis shoes that one is purchasing should be able to protect and support one`s feet ideally. thomas sabo bracelet clearance They are equally as good for keeping the water and weather away from your feet and both brands offer cheap golf shoes as well as their many expensive varieties. thomas sabo Shopping at FootJoy or Adidas can give you fashion, color, and a large line of shoes online and in stores.At any rate, be mindful of our golf game if you are a real competitor--know that shoes are the most vital part of your golfing attire. discount thomas sabo You need to shop around, compare prices. And get the most for your money. thomas sabo sale uk That doesn't mean you should opt for a pair of discount shoes that also have cheap quality. What would be the point of purchasing a shoe that is not comfortable to wear. thomas sabo jewellery If you care anything about your success in golfing, shop around. thomas sabo silver The Heel Box - it is an important part of the shoes.

    BalasHapus
  57. thomas sabo bracelet Some basic considerations can help a person to get the right par of shoes. Below are some of the important points that one may need to think about before getting the shoes. thomas sabo bracelets Style is not that important - majority of the people choose their tennis shoes considering only brand names and its looks. discount thomas sabo bracelet They don`t keep the importance of their feet up front most of the times. It can be a little hard to give up an awesome looking pair of shoes that matches your personality cheap thomas sabo bracelet But when it comes to the usage, they should be chosen based on their functionality. The tennis shoes that one is purchasing should be able to protect and support one`s feet ideally. thomas sabo bracelet clearance They are equally as good for keeping the water and weather away from your feet and both brands offer cheap golf shoes as well as their many expensive varieties. thomas sabo Shopping at FootJoy or Adidas can give you fashion, color, and a large line of shoes online and in stores.At any rate, be mindful of our golf game if you are a real competitor--know that shoes are the most vital part of your golfing attire. discount thomas sabo You need to shop around, compare prices. And get the most for your money. thomas sabo sale uk That doesn't mean you should opt for a pair of discount shoes that also have cheap quality. What would be the point of purchasing a shoe that is not comfortable to wear. thomas sabo jewellery If you care anything about your success in golfing, shop around. thomas sabo silver The Heel Box - it is an important part of the shoes.

    BalasHapus
  58. ini biar tampilannya jd kaya apa? ko aku coba ga bisa ya?

    BalasHapus
  59. lama gak mampir kesini.
    tampilannya dah beda.

    BalasHapus
  60. Makasih Mas Doy, keterangannya sangat jelas. ane coba ganti warna teks sama latar ternyata juga bisa. sebagai pemula saya sangat senang.

    BalasHapus
  61. oke mas makasih infonya. saya buat latar warna berbeda bica machting dengan warna blog

    BalasHapus

Posting Komentar

Postingan Populer