Providing a handy list of recent comments is a good way to let visitors see who else is reading and commenting on your blog. Also, if they are following any of the comment threads, it will be easier for them to see at a glance if other people have joined in the discussions. This feature might sit in your sidebar and look something like this:
The date on each line will link to the page holding that particular comment so it can be read in full. Note that you can change the format of the date (and/or include the time as well) by changing the comment timestamp setting on the Settings | Comments tab in Blogger.
Comments left by Blogger members will have their names linked to their profiles. Anonymous comments, or comments left as "Other" but without a URL specified, will be unlinked. If someone comments as "Other" and specifies a URL, that will be the destination of the link.
Adding the Code to Your Blog
Here's the code you need to get this in your blog:
Recent Comments
- <$BlogCommentAuthor$> // <$BlogCommentDateTime$>
The
tags mean that this list will only appear on the main page of your blog. You could also put it on the archive pages, by changing this to
, but it wouldn't make much sense to have it on the post pages, since they already list all their comments.The
tag cycles us through every post on the page, while the
tag lets us only dispay information for posts with comments enabled. Then the
tag iterates through every comment for each post. For the comments themselves, we chose to just display the author and the time, with a link to the comment, to keep it compact. If you want to show other information, feel free to check out the rest of our template tags for comments.
The
No comments:
Post a Comment