Thiết kế khóa học

[Add-On Firefox][threecolumns]

Năng lực Dẫn giảng

[test1][list]

Cách 3 tạo Related Posts - Các bài liên quan cho Blogspot

hôm nay tôi xin giới với các bạn Cách 3 tạo Related Posts - Các bài liên quan cho Blogspot có một lợi thế không làm ảnh hưởng đến tốc độ truy cập vào khách truy cập.

Có hai bước rất đơn giản để bạn tạo cho blog của mình Related Post/Archives.

Bước 1 : Copy và dán code dưới đây vào phía trên tag </head>

<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 {
color : #940f04;
font-size : 20px;
font-weight : normal;
margin : 5px 7px 0;
padding : 0 0 5px;
}
#related-posts a {
color : #054474;
font-size : 11px;
text-decoration : none;
}
#related-posts a:hover {
color : #054474;
text-decoration : none;
}
#related-posts ul {
border : medium none;
margin : 10px;
padding : 0;
}
#related-posts ul li {
display : block;
background : url("http://i299.photobucket.com/albums/mm297/zozuglogger/weed-bullet.gif") no-repeat 0 0;
margin : 0;
padding-top : 0;
padding-right : 0;
padding-bottom : 1px;
padding-left : 16px;
margin-bottom : 5px;
line-height : 2em;
border-bottom:1px dotted #cccccc;
}
</style>
<script src='http://technotrixdebajyoti.googlepages.com/RelatedPostsByRealtrix.co.cc.js' type='text/javascript'/>

Bạn hãy Save your template trước khi chuyển sang bước tiếp theo.


Step 2 : Tìm tag <p><data:post.body/></p> trong template. Trước khi tìm hãy chắc rằng bạn đã click chọn "Expand Widget Template" trong "Chỉnh sửa HTML".
Copy và dán mã dưới đây vào dưới <p><data:post.body/></p>

<b:if cond='data:blog.pageType == "item"'>
<div id="related-posts">
<font face='Arial' size='3'><b>Related Posts : </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>

Bạn đã hoàn thành công việc, giờ hãy Save và xem kết quả của mình đã thực hiện.

Blog của tôi sau khi thực hiện hai bước trên có hình dạng sau:

Chúc bạn thành công với các thủ thuật mới hơn nữa.

Post A Comment
  • Blogger Comment using Blogger
  • Facebook Comment using Facebook
  • Disqus Comment using Disqus

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


Bài viết của khách

[SEO][bleft]

Trò chơi phá băng

[Yahoo][list]

Trò chơi tạo năng lượng

[test2][grids]

Trò chơi chuyển tải nội dung

[Software][threecolumns]