|
|
Last week, one of my blog readers sent me a mail stating that he wanted to add a comments section on blogger like the one displayed in my blog right now. I started receiving few mails from different readers regarding the same hack for the past few days. So, I wanted to share this hack on "How To Add A Wordpress Like Comments Section For Blogger/Blogspot Blogs?" with my readers. If you wish to take a look at the final output, then scroll down and view the comments section on my blog or else, just check out the screen shot below.
To add this "Stylish Wordpress Type Comments Section" on your blogger blog, just follow the following steps. Please, make a back up of your template before you make any modifications. To create a back up, navigate to "Design->Edit HTML" and click on the "Download full template" link at the top. Once the back up is over, follow these steps carefully.
1. Click on the expand template icon. Now, search for the following piece of code in it. You may use "CTRL+F" to fasten your search results.
<a expr:name='data:comment.anchorName'/>
<b:if cond='data:blog.enabledCommentProfileImages'>
<data:comment.authorAvatarImage/>
</b:if>
<b:if cond='data:comment.authorUrl'>
<data:comment.author/>
</b:if>
<data:commentPostedByMsg/>
</dt>
<span class='deleted-comment'><data:comment.body/></span>
<b:else/>
<p>
<data:comment.body/>
</p>
</b:if>
</dd>
<dd class='comment-footer'>
<span class='comment-timestamp'>
<a expr:href='data:comment.url' title='comment permalink'>
<data:comment.timestamp/>
</a>
<b:include data='comment' name='commentDeleteIcon'/>
</span>
</dd>
</b:loop>
</dl>
</div>3. The following code should be replaced with block of code mentioned in step2.
If you still do not know what code should be removed, then ping me via email and I will solve your problem.
5. Take a break with a cup of coffee:) Now, find the following code in your template.
7. Huh!!! That's it!!! Save your template and you will find the "Wordpress Style Comments Section" on your blog.
For further customizations like adding a background to the comments section, etc.. you can edit the CSS part or view "Our Services" page for any type of customization seen on blogger blogs. How ever, I have provided space for various customizations in the code by default. So, if you know little HTML then, the job should be very easy!!!
I hope you enjoyed this hack. If you need any clarifications regarding this hack, then feel free to comment on my blog or ping me via email. I will clarify your doubts as early as possible. Also, we would be happy to receive comments from readers who understood what I blabbered in this post and successfully installed this hack on their blog:)
To add this "Stylish Wordpress Type Comments Section" on your blogger blog, just follow the following steps. Please, make a back up of your template before you make any modifications. To create a back up, navigate to "Design->Edit HTML" and click on the "Download full template" link at the top. Once the back up is over, follow these steps carefully.
1. Click on the expand template icon. Now, search for the following piece of code in it. You may use "CTRL+F" to fasten your search results.
<div expr:id='data:widget.instanceId + "_comments-block-wrapper"'>
2. Replace the following block of code with the code mentioned in step 3.<div expr:id='data:widget.instanceId + "_comments-block-wrapper"'>
<dl expr:class='data:post.avatarIndentClass' id='comments-block'>
<b:loop values='data:post.comments' var='comment'><dt expr:class='"comment-author " + data:comment.authorClass' expr:id='data:comment.anchorName'>
<b:if cond='data:comment.favicon'><img expr:src='data:comment.favicon' height='16px' style='margin-bottom:-2px;' width='16px'/>
</b:if><a expr:name='data:comment.anchorName'/>
<b:if cond='data:blog.enabledCommentProfileImages'>
<data:comment.authorAvatarImage/>
</b:if>
<b:if cond='data:comment.authorUrl'>
<a expr:href='data:comment.authorUrl' rel='nofollow'><data:comment.author/></a>
<b:else/><data:comment.author/>
</b:if>
<data:commentPostedByMsg/>
</dt>
<dd class='comment-body' expr:id='data:widget.instanceId + data:comment.cmtBodyIdPostfix'>
<b:if cond='data:comment.isDeleted'><span class='deleted-comment'><data:comment.body/></span>
<b:else/>
<p>
<data:comment.body/>
</p>
</b:if>
</dd>
<dd class='comment-footer'>
<span class='comment-timestamp'>
<a expr:href='data:comment.url' title='comment permalink'>
<data:comment.timestamp/>
</a>
<b:include data='comment' name='commentDeleteIcon'/>
</span>
</dd>
</b:loop>
</dl>
</div>
<div class='comments'>
<b:loop values='data:post.comments' var='comment'>
<div id='comments-outer'>
<div class='comment-author'>
<a expr:name='data:comment.anchorName'/>
<b:if cond='data:blog.enabledCommentProfileImages'>
<data:comment.authorAvatarImage/>
</b:if>
<b:if cond='data:comment.authorUrl'>
<a expr:href='data:comment.authorUrl'><data:comment.author/></a>
<b:else/>
<data:comment.author/>
</b:if>
<span class='says'>said on :</span>
<data:comment.timestamp/>
</div>
</div>
<b:if cond='data:comment.isDeleted'>
<span class='deleted-comment'><data:comment.body/></span>
<b:else/>
<p><data:comment.body/></p>
</b:if>
</div>
</b:loop>
</div>
4. Now, its time to add the CSS part for this code. But, you need to remove the already present CSS for your comments section. To remove it, find the word "comments" in the CSS part of your template and remove the related code. The CSS part of your template are the codes which lie between the following two tags.<b:loop values='data:post.comments' var='comment'>
<div id='comments-outer'>
<div class='comment-author'>
<dt expr:class='"comment-author " + data:comment.authorClass' expr:id='data:comment.anchorName'>
<b:if cond='data:comment.favicon'><img class='avatar' expr:src='data:comment.favicon' height='35px' rel='dofollow' width='35px'/>
</b:if><a expr:name='data:comment.anchorName'/>
<b:if cond='data:blog.enabledCommentProfileImages'>
<data:comment.authorAvatarImage/>
</b:if>
<b:if cond='data:comment.authorUrl'>
<a expr:href='data:comment.authorUrl'><data:comment.author/></a>
<b:else/>
<data:comment.author/>
</b:if>
<span class='says'>said on :</span>
</dt><span style='float: left;'><b:include data='comment' name='commentDeleteIcon'/></span>
<div class='comment-meta commentmetadata'><data:comment.timestamp/>
</div>
</div>
<b:if cond='data:comment.isDeleted'>
<span class='deleted-comment'><data:comment.body/></span>
<b:else/>
<p><data:comment.body/></p>
</b:if>
</div>
</b:loop>
</div>
<b:skin> CSS OF YOUR TEMPLATE </b:skin>
Once, you find the code with name "comments", remove the blocks of code associated with them. Please have a look at the following picture for better understanding.If you still do not know what code should be removed, then ping me via email and I will solve your problem.
5. Take a break with a cup of coffee:) Now, find the following code in your template.
]]></b:skin>
6. Copy and paste the following piece of code just above/before the line mentioned in step5./* Comments Section By www.newbloggingtipz.com */
#comments{
background : #fff url() no-repeat top;
float : left;
width : 590px;
font-size:12px}
#comments h4{ margin:1em 0; font-weight:bold; font-size:15px; text-shadow:1px 1px 1px #ddd; line-height:1.4em; text-transform:uppercase; letter-spacing:.2em; color:$sidebarcolor}
#comments-outer{ background:#f4f4f4; border:1px solid #ddd; margin:1em 0 2.5em; padding:10px; line-height:1.6em}
.avatar-image-container{margin-right:20px; padding:0; float:right; width:48px; height:48px; margin-top:-20px}
.avatar-image-container img{background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglHGuyFKyjKBl5xGPIjp058fSdIToYig9X2n59rL4LAutnnZvDJHmbu1qIvfrMSRiAUr6Ha5LffkTtVL-HFlCsNs2q37a6Q-QsypnQ-FXpA7Tv80595pugegAYRO54JE_wYhkNp0YA4EQ/s400/grav.png); width:48px; height:48px; border:1px solid #ddd}
.deleted-comment{ font-style:italic; color:gray}
.comment-body-author{background:#f4f4f4}
#comments{
background : #fff url() no-repeat top;
float : left;
width : 590px;
font-size:12px}
#comments h4{ margin:1em 0; font-weight:bold; font-size:15px; text-shadow:1px 1px 1px #ddd; line-height:1.4em; text-transform:uppercase; letter-spacing:.2em; color:$sidebarcolor}
#comments-outer{ background:#f4f4f4; border:1px solid #ddd; margin:1em 0 2.5em; padding:10px; line-height:1.6em}
.avatar-image-container{margin-right:20px; padding:0; float:right; width:48px; height:48px; margin-top:-20px}
.avatar-image-container img{background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglHGuyFKyjKBl5xGPIjp058fSdIToYig9X2n59rL4LAutnnZvDJHmbu1qIvfrMSRiAUr6Ha5LffkTtVL-HFlCsNs2q37a6Q-QsypnQ-FXpA7Tv80595pugegAYRO54JE_wYhkNp0YA4EQ/s400/grav.png); width:48px; height:48px; border:1px solid #ddd}
.deleted-comment{ font-style:italic; color:gray}
.comment-body-author{background:#f4f4f4}
For further customizations like adding a background to the comments section, etc.. you can edit the CSS part or view "Our Services" page for any type of customization seen on blogger blogs. How ever, I have provided space for various customizations in the code by default. So, if you know little HTML then, the job should be very easy!!!
I hope you enjoyed this hack. If you need any clarifications regarding this hack, then feel free to comment on my blog or ping me via email. I will clarify your doubts as early as possible. Also, we would be happy to receive comments from readers who understood what I blabbered in this post and successfully installed this hack on their blog:)
Click here to subscribe to FREE email updates from "Everything About Blogging", so that you do not miss out anything that can be valuable to you and your blog!
Interesting and useful article. Thank's.
REPLYit is hard for me to see the code of my blog.
REPLYwww.phstream.com
this is my blog, and i installed the it seems there is somethings wrong in my template.
thanks!
WOW! this looks rad! I'll try this when I get home. Thanks a lot :)
REPLY@Sergey: Thanks for the comment! I hope you installed this widget on your blog and you enjoy other similar articles on my blog.
REPLY@PHSTREAM: Do you face any installation problem? Then, send me the template and I will solve your problem. I looked at your website. You website is a customized one. So the coding may vary. I will release a blogger template in a day or two. Check out the template. You will definitely love it!!
REPLY@Boris: Thanks for the comment!! Let me know how your blog looks after the installation. And how easy the installation was. Expecting your views!!!
REPLY@Anonymous: I did not exactly under stand what you meant by "I agree with the post above". Anyway, thanks for the comment!!
REPLYThis tips is really great to enhance the look of a Blogger-based blog. However for who doesn't so familiar with coding can simply use Disquss service
REPLY@infoomatic: Thanks for the comment! Your absolutely right!! If it is difficult to understand the coding, then you have many alternatives now on the web!!
REPLYThis was really great! I been thinking about it for a very long time... this post cleared up my mind from thinking about it and replacing this method... Thank you so much... This post was appreciated a lot...
REPLY@Maritime Law Firm: Thanks for the comment! I'm glad that I helped you in some!! I hope you like the other posts on my blog as well!!
REPLYnice, but why to have Wordpress like comments For Blogger/Blogspot Blogs, their own comment system is also good! :P
REPLY@Xahing Tuor: Thanks for the comment! If people like the blogger style comments, they can very well leave that way. If they feel the blogger style comments aren't good, then they can adopt to this style. It's their wish!! I just shared the knowledge I had:)
REPLYnice, but why to have Wordpress like comments For Blogger/Blogspot Blogs, their own comment system is also good! :P
REPLYThis was really great! I been thinking about it for a very long time... this post cleared up my mind from thinking about it and replacing this method... Thank you so much... This post was appreciated a lot...
REPLYThis tips is really great to enhance the look of a Blogger-based blog. However for who doesn't so familiar with coding can simply use Disquss service
REPLY@Mukund
REPLYdoes the reply thingy work?
@Anonymous: I think it is working! You published your comment using the reply option and it is published on top. So, it should work!!!
REPLY@Mukund
REPLYcan this be done with disgus comment system?
@author: Thanks for the comment! But, I'm afraid if this could be done on disqus. As far as I know, we can't get this style on disqus. They allow custom CSS but I'm not sure if this customization could be done!!!
REPLYThis is really great. Keep it up the good going. Really very great blog this has given me all the information that i needed, good for visiting daily it will increase our knowledge. Best luck for future.
REPLY@internet marketing melbourne: Thanks for the comment!! I hope you enjoy the updates from my blog as well!!
REPLY@Mukund Thanks
REPLYit's not working on my blog..
REPLY@Joy Norin: Hmmm!!! Did you place the codes at the right position? If not, check them once again. Still facing problems, you can contact me via email and I will help you out!!!
REPLYI am very content to find this blog.Thanks for having the page! Im positive that it will become extremely popular.
REPLYWhirlpool Baths
@Whirlpool Baths: Thanks for the comment! I hope you enjoy my other articles as well!!!
REPLYSomeone I work with visits your blog frequently and recommended it to me to read too. The writing style is great and the content is top-notch. Thanks for the insight you provide the readers!
REPLY@Anonymous: Thanks for your comment!!! I'm happy that you like the articles on my blog. Convey my thanks to the person who suggested you this blog!!!
REPLYVery useful list of templates…thanks for the compilation!
REPLY@Anonymous: This comment should go with another article on my blog! Any way, thanks for the comment!
REPLYAwesome ! Article was so commendable . I hope , you will give more information ........................................................
REPLYregards:
http://www.viaam.com
@bag manufacturers: Thanks for the comment! I hope you enjoy reading the other articles on my blog!!!
REPLYBeen looking for this article for long time ago and finally found here. thanks for sharing this post. appreciate!
REPLY@Anonymous: I'm happy that you found the article here. Hope you enjoy the other articles on my blog as well!!!
REPLYI enjoy reading a lot and your stories are worth reading, nice blog, keep it up.
REPLY@Anonymous: Thanks for reading my articles! I hope you enjoy every article published on my blog!!!
REPLYMukund!can you help me?as I tried to do this but seems like I cant find the code.
REPLY@rotcais: Sure buddy! You can always reach me through my email. I will help you out!!!
REPLYHi Mukund, Thanks for implementig this hack. I would like to know how to change auhtor background color. The CSS states: .comment-body-author{background:#f4f4f4} ; but in code nothing attribute to comment body author. Thanks for reply. Vladimir
REPLY@Vladimir Klimsa: Oh! May be I forgot to include that. Just add an if condition for blog author and set the color to the one you want. I hope you know to fix them. Else, let me know and I will get the code for the same!
REPLY@Sergey: Thanks for the comment! I hope you installed this widget on your blog and you enjoy other similar articles on my blog.
REPLYInteresting and useful article. Thank's.
REPLYI'm glad I discovered this genuinely excellent web site
REPLY@Table saw: Yup! Thanks for the comment! I hope you enjoy the upcoming articles on my blog as well!
REPLYHi, I can't find the CSS thing ):
REPLYthere's just nothing at all with the
please contact me via me blog:
shenanigansofcaroline.blogspot.com
@Caroline: You can't find the CSS thing in the sense! Please be more specific so that I can help you out! Drop me an email stating your prob with screen shot so that I can fix it!
REPLYnot working tell me what to do
REPLYwww.devilstoolshop.com
this is my blog
Use the tab below to comment. No spam please!!!
POST YOUR COMMENT