Hướng dẫn tạo bài viên liên quan cho blogspot

Để tạo bài viết liên quan trong blogspot thuthuatso.com xin chia sẻ với các bạn thủ thuật sau:

Các bạn đăng nhập vào blogspot của mình, vào “Thiết kế” -> “Chỉnh sử HTML” -> Mở rộng mẫu tiện ích

Nhấn tổ hợp phím Ctrl+F tìm thẻ đóng </head> thêm vào trước đó đoạn sau:
<style> #related-posts { float : left; width : 540px; margin-top:20px; margin-left : 5px; margin-bottom:20px; font : 11px Verdana; margin-bottom:10px; } #related-posts .widget { list-style-type : none; margin : 5px 0 5px 0; padding : 0; } #related-posts .widget h2, #related-posts h2 { font-size : 20px; font-weight : normal; margin : 5px 7px 0; padding : 0 0 5px; } #related-posts a { text-decoration : none; } #related-posts a:hover { text-decoration : none; } #related-posts ul { border : medium none; margin : 10px; padding : 0; } #related-posts ul li { display : block; background : url(“http://lh3.ggpht.com/_cNpXRtRph18/S76dASm3WGI/AAAAAAAAEJg/AVmw4HhRdsk/rss.png”) no-repeat 0 0; margin : 0; padding-top : 0; padding-right : 0; padding-bottom : 1px; padding-left : 21px; margin-bottom : 5px; line-height : 2em; border-bottom:1px dotted #cccccc; } </style> <script src=’http://bsaves.com/scripts/Related_posts_hack.js’ type=’text/javascript’/>

Tìm tiếp  <div class=’post-body> hoặc <data:post.body/>  thêm vào sau đó đoạn sau:
<b:if cond=’data:blog.pageType == “item”‘>
<div id=”related-posts”>
<font face=’Arial’ size=’3′><b>Bài viết liên quan : </b></font><font color=’#FFFFFF’><b:loop values=’data:post.labels’ var=’label’><data:label.name/><b:if cond=’data:label.isLast != &quot;true&quot;’>,</b:if><b:if cond=’data:blog.pageType == &quot;item&quot;’>
<script expr:src=’&quot;/feeds/posts/default/-/&quot; + data:label.name + &quot;?alt=json-in-script&amp;callback=related_results_labels&amp;max-results=5&quot;’ type=’text/javascript’/></b:if></b:loop> </font>
<script type=’text/javascript’> removeRelatedDuplicates(); printRelatedLabels();
</script>
</div></b:if>

Các bạn có thể thay số bài viết hiển thị tại max-results=5 theo mặc định là 5 bài.
Sau khi chỉnh sửa các bạn nhấn Lưu và ra xem thành quả của mình nhá,
Chúc các bạn thành công.

Bài viết liên quan:

Subscribe to Comments RSS Feed in this post

One Response

  1. http://www.fileden.com/files/2011/4/13/3114652//Như hình trên thì em muôn tạo 1 phần toàn phần mền download em dung them cua blogger.doc
    câu hỏi cua em nè.

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*

Phan mem quan ly ban hang || Phan mem quan ly nhan su || Phan mem ban hang || Shop Đồng Hồ Hai Trieu | Game Quan ly doi bong | Giải đáp tin học | Nghe Nhạc Hay Nhất | Thủ Thuật Tin Học | Bang gia Server | Phần mềm quản lý bán hàng | Đông Trùng Hạ Thảo | Địa ốc bất động sản | Sàn giao dịch địa ốc nhà đất | Rao vặt,đăng tin|Diễn đàn Bí Quyết Làm Sạch |