Menu

Tạo trang chứa tiêu đề tất cả các bài viết cùng label

Follow the steps given below.
  1. Edit Page in Blogger editor.
  2. Choose HTML mode.
  3. Paste below Code into It.
<script type="text/javascript">
//<![CDATA[    
var tocstyle = true;
var numposts = 100;
//]]>
</script>
<script type="text/javascript">
//<![CDATA[    
function showrecentpost(json) {
for (var i = 0; i < numposts; i++) {
var entry = json.feed.entry[i];
var posttitle = entry.title.$t;
var posturl;
if (i == json.feed.entry.length) break;
for (var k = 0; k < entry.link.length; k++) {
if (entry.link[k].rel == 'alternate') {
posturl = entry.link[k].href;
break;
}}
posttitle = posttitle.link(posturl);
if (tocstyle) document.write('<li>');
document.write(posttitle);}
if (tocstyle) document.write('</li>');
}
//]]>
</script>
<style type="text/css">
.tocpage {border:1px solid #f86e7d;}
.tocpage ul {margin-top:10px;}
.tocpage ul li{padding:5px 0px;}
</style>
<div class="tocpage">
<h3>YOUR LABEL NAME HERE</h3>
<ul><script src="http://YOUR-URL-HERE.blogspot.com/feeds/posts/default/-/LABEL-HERE?orderby=published&amp;alt=json-in-script&amp;callback=showrecentpost&amp;max-results=100">
</script></ul>
</div>
Now Change YOUR-URL-HERE with your Blog url. and LABEL-HERE with label, and 

YOUR LABEL NAME HERE with yours


Không có nhận xét nào :

Đăng nhận xét