Thứ Ba, 22 tháng 4, 2014

Seo cho Blogspot 1 cách hiệu quả [Phần 3]

Hôm nay sẽ tiếp tục với phần 3 của bài viết Seo cho Blogspot 1 cách hiệu quả
3: Tối ưu hoá tiêu đề bài viết

a. Sửa thẻ của bài viết</b><br style="color: rgb(51, 51, 51); font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 13px; background-color: rgb(250, 250, 250);"><span style="color: rgb(51, 51, 51); font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 13px; background-color: rgb(250, 250, 250);">Thông thường khi bạn viết một bài mới thì <title> bài viết của bạn sẽ có dạng : </span><font color="#ff8c00" style="font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 13px; background-color: rgb(250, 250, 250);">Tiêu đề Blog: Tiêu đề bài viết</font><br style="color: rgb(51, 51, 51); font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 13px; background-color: rgb(250, 250, 250);"><span style="color: rgb(51, 51, 51); font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 13px; background-color: rgb(250, 250, 250);">Tuy nhiên, để tiện cho việc SEO bài viết sau này, các bạn hãy đưa tiêu đề bài viết lên phía trước. Ví dụ : </span><font color="#ff8c00" style="font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 13px; background-color: rgb(250, 250, 250);">Tiêu đề bài viết | Tiêu đề Blog<br><br></font><span style="color: rgb(51, 51, 51); font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 13px; background-color: rgb(250, 250, 250);">Để làm được điều này các bạn tìm tới đoạn code :</span><br style="color: rgb(51, 51, 51); font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 13px; background-color: rgb(250, 250, 250);"><font color="#ff0000" style="font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 13px; background-color: rgb(250, 250, 250);"><title><data:blog.pageTitle/>


Và sửa lại thành :
PHP Code:
<b:if cond='data:blog.pageType == "item"'>
<
title><data:blog.pageName/> | <data:blog.title/></title>
<
b:else/>
<
title><data:blog.pageTitle/></title>
</
b:if>  
b. Thêm mô tả cho link của tiêu đề.
Khi đưa chuột vào tiêu đề bài viết, bạn sẽ thấy hiện lên phần mô tả cho đường link đó.
Để làm được điều này các bạn làm như sau :
Tìm đến dòng :
PHP Code:
<a expr:href='data:post.link'><data:post.title/></a>  
và sửa thành :
PHP Code:
<a expr:href='data:post.link' expr:title='data:post.title'><data:post.title/></a>  
Tiếp tục tìm đến dòng
PHP Code:
<a expr:href='data:post.url'><data:post.title/></a>  
và sửa thành
PHP Code:
<a expr:href='data:post.url' expr:title='data:post.title'><data:post.title/></a>  


C. Chỉnh tiêu đề bài viết thành


Đăng nhập vào Blogger -> chỉnh sửa HTML -> Tiện ích mở rộng
Tìm đoạn code sau
PHP Code:
<b:if cond='data:post.title'>
<
h3 class='post-title'>
<
b:if cond='data:post.link'>
<
a expr:href='data:post.link' expr:title='data:post.title'><data:post.title/></a>
<
b:else/>
<
b:if cond='data:blog.pageType != "item"'>
<
a expr:href='data:post.url' expr:title='data:post.title'><data:post.title/></a>
<
b:else/>
<
data:post.title/>
</
b:if>
</
b:if>
</
h3>
</
b:if>  
và sửa thành :
PHP Code:
<b:if cond='data:blog.pageType != "item"'>
<
b:if cond='data:blog.pageType != "static_page"'>
<
b:if cond='data:post.title'>
<
h3 class='post-title'>
<
b:if cond='data:post.link'>
<
a expr:href='data:post.link' expr:title='data:post.title'><data:post.title/></a>
<
b:else/>
<
b:if cond='data:post.url'>
<
a expr:href='data:post.url' expr:title='data:post.title'><data:post.title/></a>
<
b:else/>
<
data:post.title/>
</
b:if>
</
b:if>
</
h3>
</
b:if>
<
b:else/>
<
h1 class='post-title'>
<
b:if cond='data:post.link'>
<
a expr:href='data:post.link' expr:title='data:post.title'><data:post.title/></a>
<
b:else/>
<
data:post.title/>
</
b:if>
</
h1>
</
b:if>
<
b:else/>
<
h1 class='post-title'>
<
b:if cond='data:post.link'>
<
a expr:href='data:post.link' expr:title='data:post.title'><data:post.title/></a>
<
b:else/>
<
data:post.title/>
</
b:if>
</
h1>
</
b:if>  
Chỉnh sửa CSS cho thẻ

, tìm đến dòng


.post h3 {…}
.post h3 a, .post h3 a:visited {…}
.post h3 a:hover {…}
và sửa thành
.post h1, .post h3 {…}
.post h1 a, .post h1 a:visited, .post h3 a, .post h3 a:visited {…}
.post h1 a:hover, .post h3 a:hover {…}
lưu lại và kiểm tra kết quả :

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

Đăng nhận xét