เปลี่ยนบล็อกไตเติ้ลไปตามหัวข้อการโพส(Change Blog title follow post title )
Posted by กิตติ at 7:10 PMอ่านมาจากบอร์ดThaiseoเลยลองเข้าไปที่บล็อกหลักของwebtalk
เหตุผลของการปรับไตเติ้ลไปตามหัวข้อโพสนั้นก็เพื่อผลทางการค้นหา SEO
ให้Keywordมีความสัมพันธ์กับบล็อก หวังผลให้อันดับในSearch Engineดีขึ้น
แม้ตอนนี้จะไม่รู้ว่าจริงๆ Title Tagที่ปรากฎKeywordที่สัมพันธ์กับเนื้อหาบล็อกแล้วจะได้อันดับดี
ผมก็ยังจะเปลี่ยนtilte tagไปตามหัวข้อกระทู้ ดูเข้าท่ากว่า
วิธีการให้เข้าไปที่ Layout แล้วเลือกตรง edit HTML ให้หาดูตรง Headerว่ามีข้อความนี้:
<title><data:blog.pagetitle/></title>
แก้เป็น:
<!-- Start Widget-based: Changing the Blogger Title Tag -->
<b:if cond='data:blog.pageType == "item"'>
<b:section id='titleTag'>
<b:widget id='Blog2' locked='false' title='Blog Posts' type='Blog'>
<b:includable id='comments' var='post'/>
<b:includable id='postQuickEdit' var='post'/>
<b:includable id='main' var='top'><title><b:loop values='data:posts' var='post'><b:include data='post' name='post'/></b:loop> ~ <data:blog.title/></title></b:includable>
<b:includable id='backlinkDeleteIcon' var='backlink'/>
<b:includable id='feedLinksBody' var='links'/>
<b:includable id='backlinks' var='post'/>
<b:includable id='status-message'/>
<b:includable id='feedLinks'/>
<b:includable id='nextprev'/>
<b:includable id='commentDeleteIcon' var='comment'/>
<b:includable id='post' var='post'><data:post.title/></b:includable>
</b:widget>
</b:section>
<b:else/>
<title><data:blog.pageTitle/></title>
</b:if>
<!-- End Widget-based: Changing the Blogger Title Tag -->
อีกวิธีหนึ่งก็เปลี่ยนเป็น:
<title> <data:blog.pageName/> | <data:blog.title/> </title>
ผมลองเปลี่ยนแล้วก็ได้ผลอยู่ อย่างบล็อกนี้ที่แสดงในTitle tagก็เป็นผลจากคำสั่งอันที่สองนี้ ส่วนอันแรกกับอันสุดท้ายลองใส่แล้วมันฟ้องว่าerror ไม่ยอมให้เซฟเทมเพลต
อีกโค้ดหนึ่งที่เห็นแปะให้ใช้กัน
</b:includable></b:includable></b:includable></b:includable></b:includable></b:includable></b:includable></b:includable></b:widget></b:section></b:if>
Labels: Tips andTricks