Sunday, November 14, 2010

Remove Date from Particular Posts in Blogger BlogSpot

Previously, I showed you how to remove the date from all posts. A reader asked me how to remove the date just from particular posts, not all. You can do it also. There is 2 ways you can achieve this.

1. You can create a page.

  • In blogger, a page does not have the date.
  • Login to your account -->Click on "Posting" tab --> Click on "Edit Pages" --> Click on "New Page" to make a page.

Note: This page does not show up on your blog post. You have to link to it from somewhere on your blog.

2. Modify your template to remove the date from particular posts

Since, Blogger Blogspot only allows you to have maximum of 10 pages. If you reach that maximum, you may want to have more pages. The only way you can have it is to modify your template.

a. Search for
<span class='post-timestamp'>
b. Before that line add:
<b:if cond='data:post.url != "http://www.blogsmonetize.com/2010/11/highlight-author-comments-in.html"'>
c. Add the following code after the close tag </span>:
</b:if>
d. The final code should look similar to the following code
<b:if cond='data:post.url != "http://www.blogsmonetize.com/2010/11/highlight-author-comments-in.html"'>
<span class='post-timestamp'>

<b:if cond='data:top.showTimestamp'>
<data:top.timestampLabel/>
<b:if cond='data:post.url'>
<a class='timestamp-link' expr:href='data:post.url' rel='bookmark' title='permanent link'>
<abbr class='published' expr:title='data:post.timestampISO8601'>
<data:post.timestamp/>
</abbr>
</a>
</b:if>|
</b:if>
</span>
</b:if>
Remember to change the URL to the URL that you want to remove the date.

To remove the date from more than 1 post. You can use the nested if statement as below

<b:if cond='data:post.url != "http://www.blogsmonetize.com/2010/11/title-tag-optimization-very-important.html"'>
<b:if cond='data:post.url != "http://www.blogsmonetize.com/2010/11/highlight-author-comments-in.html"'>
<span class='post-timestamp'>

<b:if cond='data:top.showTimestamp'>
<data:top.timestampLabel/>
<b:if cond='data:post.url'>
<a class='timestamp-link' expr:href='data:post.url' rel='bookmark' title='permanent link'>
<abbr class='published' expr:title='data:post.timestampISO8601'>
<data:post.timestamp/>
</abbr>
</a>
</b:if>|
</b:if>
</span>
</b:if>
</b:if>
Hope it helps you.

13 comments:

  1. I tried this many times and could not get it to work :(

    ReplyDelete
  2. Can you please try again? I made this code by myself and tested before posting it here. It worked.

    ReplyDelete
  3. I couldn't get it to work either.

    ReplyDelete
  4. does it work on the new blogger? I can't see 'post-timestamp'

    ReplyDelete
  5. Hii Author,
    How i can know that it is working or not,i didn't find any change ,may be it's not working......

    ReplyDelete
  6. I can't get this to work either. Tried a few times. Please could you help?

    ReplyDelete
  7. I too tried for my blog but it didn't work. but thanks for the other posts which or much informative. http://employment-rozgar-samachar.blogspot.com

    ReplyDelete
  8. Doesnt work following erroe comes

    Your template could not be parsed as it is not well-formed. Please make sure that all XML elements are closed properly.
    XML error message: The element type "b:if" must be terminated by the matching end-tag "".
    Error 500

    ReplyDelete
  9. I can't even find the first part of the html to connect it with and that is using the find feature! So much for that?

    ReplyDelete
  10. I cant get this to work? Tried exactly as you have listed here. Any suggestions as to why it is not working.

    ReplyDelete