Saturday, April 17, 2010

Post title Only when in Labels Page

This Blogging tips is for blogger blog.This hack is to avoid possible duplicate pages crawl by Search engine for your blogspot blog.If your blog has LOTS of duplicate pages it might give the search engine spider confused which one is your target page ,or it might de-rank your page rage.

Note that this blog tips is written or refer to blogspot blog but the principle apply to others blogging platform too,adding too many "tag"or "category" will make your blog has pletty of of duplicated page. Yeah you duplicate yourself.And that not good in SEO

This blogger blog hack will make your blog show only post title and links instead display full post content when clicking a labels.Below are the steps to hide the post content and only showing post title for the label pages:

1. Login into your Blogger / Blogspot account

2. Click on Layout > Edit HTML > Expand Widge

3. Now search for this line of code.
<b:include data='post' name='post'/>
4. Replace the above code with the following codes
<b:if cond='data:blog.homepageUrl !=
data:blog.url'>
<b:if cond='data:blog.pageType != "item"'>
<a expr:href='data:post.url'>
<div style="padding:6px 0 6px 5px;border-right:1px solid #000;border-bottom:1px solid #000;margin-bottom:2px;background:#333333;color:white">
<data
:post.title/></div></a>
<b:else/>
<b:include data='post' name='post'/>
</b:if>
<b:else/>
<b:include data='post' name='post'/>
</b:if>
Note that the highlighted test is where you can edit the color font and the border to meet your blog design.




No comments: