Cara Menampilkan Jumlah Posting dan Jumlah Komentar Blogger

Cara Menampilkan Jumlah Posting dan Jumlah Komentar Blogger

Tampilkan Jumlah Posting dan Jumlah Komentar dengan JSON

Tambahkan sebuah elemen halaman HTML/JavaScript, kemudian letakkan kode ini di dalam formulirnya:

<style type="text/css">
#counter {
margin:10px 60px 10px 10px;
background-color:#990000;
font:bold 12px Cambria,Georgia,Serif;
color:#fff;
position:relative;
display:block;
line-height:50px;
padding:0px 0px 0px 30px;
left:-10px;
}

#counter:before {
content:"";
width:0px;
height:0px;
border:5px solid transparent;
border-top-color:#bb0000;
border-right-color:#bb0000;
position:absolute;
top:100%;
left:0px;
}

#counter:after {
content:"";
width:0px;
height:0px;
border:25px solid #990000;
position:absolute;
top:0px;
left:100%;
border-right-color:transparent;
}
</style>
<script type="text/javascript">
function showpostcount(json) {
document.write(parseInt(json.feed.openSearch$totalResults.$t,10));
}
</script>
<div id="counter">
<script src="/feeds/posts/summary?max-results=0&alt=json-in-script&callback=showpostcount"></script> Posting &amp; <script src="/feeds/comments/summary?max-results=0&alt=json-in-script&callback=showpostcount"></script> Komentar
</div>

Klik Simpan.

Komentar

Postingan populer dari blog ini

Demo for Blogger Customized Native Functional Threaded Commenting System

StackOverflow Like Pagination

AdSense Responsive Ads - Why Not?