chia sẻ với các bạn cách tạo hiển thị tổng số bài viết và comment trên blog. Tiện ích này có tác dụng làm cho người truy cập thấy được sự phong phú trong blog và kích thích sự tò mò của họ. Các bạn có thể thấy tiện ích này bên góc của trang.
Cách làm như sau..
<script style="text/javascript">
function showpostcount(json) {
document.write('<left>TỔNG SỐ BÀI VIẾT: <b>' + parseInt(json.feed.openSearch$totalResults.$t,10)
+ '</b></center>');}</script>
<script src="https://support-kultanbinhnt.blogspot.com/feeds/posts/default?alt=json-in-script&callback=showpostcount"></script>
<p>
<script style="text/javascript"></script>
<script style="text/javascript">
function numberOfComments(json) {
document.write('<left>TỔNG SỐ COMMENT: <b>' + json.feed.openSearch$totalResults.$t +
'</b></center>');}</script>
<script src="https://support-kultanbinhnt.blogspot.com/feeds/comments/default?alt=json-in-script&callback=numberOfComments"></script></p>
Chúc Các Bạn Thành Công.