Tạo tóm tắt một phần bài viết của bạn với hình ảnh minh hoạ
Đây là chức năng tự động tạo đọc tiếp với hình thu nhỏ, bạn chỉ cần thiết lập mã HTML như sau.
Sao lưu giao diện blog của bạn trước khi thực hiện!
Làm theo các bước sau:
1. Vào "Giao diện" click "Chỉnh sửa HTML"
2. Đánh dấu chọn vào "Expand Widget Templates"
3. Tìm mã này
<data:post.body/>
Sau đó thay bằng đoạn mã sau
<script type='text/javascript'>
summary_noimg = 430;
summary_img = 340;
img_thumb_height = 100;
img_thumb_width = 120;
</script>
<script src='http://blogergadgets.googlecode.com/files/excerpt.js' type='text/javascript'/>
<b:if cond='data:blog.pageType != "item"'>
<div expr:id='"summary" + data:post.id'><data:post.body/></div>
<script type='text/javascript'>createSummaryAndThumb("summary<data:post.id/>");</script>
<span class='rmlink' style='float:right'><a expr:href='data:post.url'>Read more</a></span>
</b:if>
<b:if cond='data:blog.pageType == "item"'><data:post.body/></b:if>
summary_noimg = 430;
summary_img = 340;
img_thumb_height = 100;
img_thumb_width = 120;
</script>
<script src='http://blogergadgets.googlecode.com/files/excerpt.js' type='text/javascript'/>
<b:if cond='data:blog.pageType != "item"'>
<div expr:id='"summary" + data:post.id'><data:post.body/></div>
<script type='text/javascript'>createSummaryAndThumb("summary<data:post.id/>");</script>
<span class='rmlink' style='float:right'><a expr:href='data:post.url'>Read more</a></span>
</b:if>
<b:if cond='data:blog.pageType == "item"'><data:post.body/></b:if>
Lưu lại và chạy thử blog của bạn


Post a Comment