Pages

Saturday, December 15, 2012

Blogger: How to Change Post Display Format to "Post Title - Blog Title" In Google Search Result

If you search your Blogger (Blogspot.com) post in Google, you will notice that by default, your post format in search result page will be showing as "Blog title - post title". For example, if you search my post "How to Add a Static Stiky Post for Blogger", you will see the search result in Google as following:

Blogger Journey - How to Add a Static Stiky Post for Blogger

Which means, blog title"Blogger Journey" is always showing before post titles. This is not what we want.

The default Blogger post format in search result,  "Blog title - post title", is not good for search engine ranking, which will prevent your posts from showing at the top of the search result page.

What we want is in reverse order "Post Title - Blog Title"- post title always in front. For the above example, we want it to show up as following:

There's a easy fix to make it happen, by adding a few lines of codes to the Blogger template.

How to

Note: it's recommended to always back up your template before doing any changes.

1. From the blog Dashboard, go to Template -> Edit HTML-> Proceed -> put a check mark in front of the the "Expand Widget Templates" option (details: same as the first 3 steps in this post)

2. On your keyboard press the "Ctrl" and "F" keys at same time to bring up the search box.

3. In the search-box, type in '<title><data:blog.pageTitle/></title>' and  search, you will see the template screen shows up similar to following screenshot:


4.  We need to replace the highlighted codes <title><data:blog.pageTitle/></title> with following codes:

<b:if cond='data:blog.pageType == &quot;item&quot;'>
<title><data:blog.pageName/> | <data:blog.title/></title>
<b:else/>
<title><data:blog.pageTitle/></title>
</b:if>

Just copy above codes and replace the highlighted one line code in the template, and save the template. Close the template window.

5. You done ! You will see your posts show in the search result in the format as "Post Title - Blog Title".

What do you think

What's your experience with the post tile in the Google search result? Share your experience and insights in the comments box below.



9 comments

  1. I want to remove characters like "-" from the title and replacing with space. Like Before posting my title is "My-Name-is" after posting it must be "My Name is"

    ReplyDelete
    Replies
    1. Interesting question.

      Space in webpage address (url) is not safe. If you really want to use space, it has to be encoded. See the article here: http://stackoverflow.com/questions/497908/are-urls-allowed-to-have-a-space-in-them

      But it's possible. Take look at the url of my following post:

      http://www.bloggerjourney.com/search/label/Blogger%20Mobile%20Template

      The %20 represents the space, so if you open that post, you will the it's a space in address.

      Delete
  2. As a new blogger, this trick is really helpful! I've mentioned it in my newest blog post and given your blog credit over at www.starrconvictions.blogspot.com. The post also lists other ways to get blogs noticed!

    ReplyDelete
  3. Thanks you very much, you solved my problem.

    ReplyDelete
  4. HI Mark,

    I want to show only post title not blog title. how can i do this.

    ReplyDelete
    Replies
    1. I am also searching for that, if you find, please let me know. Thanks

      Delete
  5. Hi Mark

    Am about to edit my Blogger Blog template to show post title before blog title but am confused on the steps on how to do the actual replacing of the first code with the second one That first one line code is on line 11 of my template. Do I delete this line of code before copying and pasting the second code into the template on line 11 where the first code is? Also, should I put the second code onto a Notepad file and the copy and paste from it into the Blogger template? Please help clear this up for me because in the article where it says to replace the first code with the second one I'm totally confused as to what the steps are as to how to go about doing that replacing.

    Thanks, Doug

    ReplyDelete