Today we'll be seeing how to add comments counter to the threaded comments in blogger. I'm not wasting my time explaining about blogger comments system and threaded comments. I guess you know it and you don't want me to explain.
We'll be using the code shared by Mohammad Mustafa Ahmedzai on his blog. And he has used a non-JavaScript approach to show threaded comments in blogger.
And by the way i hope you've switched to threaded comments in blogger. If you haven't please do.
VIEW A DEMO
✔change the values highlighted in green to customize the font size and colour in main comments counter
We'll be using the code shared by Mohammad Mustafa Ahmedzai on his blog. And he has used a non-JavaScript approach to show threaded comments in blogger.
And by the way i hope you've switched to threaded comments in blogger. If you haven't please do.
VIEW A DEMO
Adding Automatic Numbering Threaded Comments
- First of all navigate to blogger dashboard > template and click on Edit HTML
don't forget to backup your template - Now search for </b:skin> and paste the following code just above it. And save the changes.
/*----- Comment Counter -----*/
.comment-thread ol {
counter-reset: mbt-comments;
}
.comment-thread li:before {
content:counter(mbt-comments);
counter-increment: mbt-comments;
font-size: 30px;
float:left;
position:relative;
top:0px;
left:-10px;
margin-right:0px;
height:100px;
margin-right:0px;
font-weight:bold;
font-family:arial, georgia;
color: #666;
}
.comment-thread ol ol {
counter-reset: mbt-comments-sub;
}
.comment-thread li li:before {
content: counter(mbt-comments) "." counter(mbt-comments-sub,lower-latin);
counter-increment:mbt-comments-sub;
font-size: 12px;
color: #666;
position:relative;
top:10px;
}
.comments .comments-content .comment-header, .comments .comments-content .comment-content { margin:0px 0px 8px 28px!important;}
Customize it for you
✔ change the values highlighted in blue to customize the font size and colour in reply comments counter
I've kept the tutorial to simple and short, so if you've and queries do leave back comments. Thanks.
Read the original article @ Mybloggertricks
Comments
Post a Comment