Pages

Mac 13, 2017

Tutorial: Cara Membuat Category Post List Blogspot :


Cara Membuat Category Post List Blogspot :

Langkahnya : 
  1. Go to Layout Design > Page Elements/Dashboard
  2. Pilih tata Letak
  3. Click Add A Widget.
  4. In Add A Widget window, select HTML/Javascript.
  5. Masukan Nama Kategori yang ingin dibuat.
  6. Copy the code below and paste it inside the content box.
  7. Click Save.
<!-- Recent Posts by Label Start -->
<!-- code by BloggerSentral.com -->
<script type="text/javascript">
function recentpostslist(json) {
 document.write('<ul>');
 for (var i = 0; i < json.feed.entry.length; i++)
 {
    for (var j = 0; j < json.feed.entry[i].link.length; j++) {
      if (json.feed.entry[i].link[j].rel == 'alternate') {
        break;
      }
    }
var entryUrl = "'" + json.feed.entry[i].link[j].href + "'";//bs
var entryTitle = json.feed.entry[i].title.$t;
var item = "<li>" + "<a href="+ entryUrl + '" target="_blank">' + entryTitle + "</a> </li>";
 document.write(item);
 }
 document.write('</ul>');
 }
</script>
<script src="YOUR_BLOGSPOT_URL/feeds/posts/default/-/YOUR_LABEL?max-results=YOUR_MAX_RESULT&alt=json-in-script&callback=recentpostslist"></script>
<!-- Recent Posts by Label End --> 

Langkah berikutnya :

  1. Ganti YOUR_BLOGSPOT_URL dengan nama blogspot kamu misalnya http://belogsjm.blogspot.my
  2. Ganti YOUR_LABEL dengan link label kamu misalnya AL-QUR%27AN%20DAN%20TERJEMAHAN.
  3. Ganti YOUR_MAX_RESULT dengan jumlah post yang ingin ditampilkan misalnya 5
Silakan save dan publish..

Kredit : SeoTipsKu

0 comments:

Catat Ulasan

Segala komen adalah hak dan tanggungjawab anda sendiri!!!
All comments are your own right and responsibility.!!!