Blogger only shows the first 200 of your comments in the (first) post page. The next 200 comments are supposed to be displayed on the second page, another 200 on the third page and so on.
When your comments count for a post exceeds 200, Blogger will automatically add a pager, so you can navigate between comment pages. But in some cases (due to third party template maybe?) no pager is added.
That’s what happened to me when one of my posts did exceed 200 comments. From the comment count (see picture above) I knew I have 202 comments, yet I could not access/view the 201st and beyond comments because the pager was nonexistent.
1 | < b:if cond = 'data:post.commentPagingRequired' > |
2 | < span class = 'paging-control-container' > |
3 | < a expr:class = 'data:post.oldLinkClass' expr:href = 'data:post.oldestLinkUrl' >< data:post.oldestLinkText /></ a > |
4 | < a expr:class = 'data:post.oldLinkClass' expr:href = 'data:post.olderLinkUrl' >< data:post.olderLinkText /></ a > |
5 | < data:post.commentRangeText /> |
6 | < a expr:class = 'data:post.newLinkClass' expr:href = 'data:post.newerLinkUrl' >< data:post.newerLinkText /></ a > |
7 | < a expr:class = 'data:post.newLinkClass' expr:href = 'data:post.newestLinkUrl' >< data:post.newestLinkText /></ a > |
Now we want to display the pager at the beginning of the comment section, right before the comment block (where all comments are listed out). You may also want to display it one more time near the end of comments section, right before comment footer.
1. Display at the beginning of comment section
- Login to your Blogger account.
- Go to Dashboard > Design > Edit HTML.
- Back up your template.
- Tick the Expand Widget Templates check box on top right of the HTML window.
- Look for following lines in your HTML code and paste the comment pager code right before it.
1 | PASTE COMMENT PAGER CODE HERE |
2 | < dl expr:class = 'data:post.avatarIndentClass' id = 'comments-block' > |
3 | < b:loop values = 'data:post.comments' var = 'comment' > |
The exact code may differ slightly and your template may have more than one places where comments-block
are used. To avoid mistakes, make sure this two keywords are there: <dl>
tag and the whole code in line 3.
2. Display at the end of comment section
Look for following code lines and just insert the comment pager code as indicated. Again the code below may vary from template to template. You may find more than one places where comment-footer
are used. To avoid mistake, make sure you can find comment-footer
and data:postCommentMsg
(line 11) in the code.
01 | PASTE THE COMMENT PAGER CODE HERE |
02 | < p class = 'comment-footer' > |
03 | < b:if cond = 'data:post.embedCommentForm' > |
04 | < b:if cond = 'data:post.allowNewComments' > |
05 | < b:include data = 'post' name = 'comment-form' /> |
07 | < data:post.noNewCommentsText /> |
10 | < b:if cond = 'data:post.allowComments' > |
11 | < a expr:href = 'data:post.addCommentUrl' expr:onclick = 'data:post.addCommentOnclick' >< data:postCommentMsg /></ a > |
3. Styling the pagers
To style the section, you simply add a styling rule in CSS, like this:
1 | .paging-control-container { |
And place it before ]]></b:skin>
line in your template code.
Enjoy!
No comments:
Post a Comment