Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+5 votes
1.4k views
in Plugins by

Here's a simple plugin to limit the number of comments shown; it still loads all the comments, just hides them after a certain number:

https://github.com/NoahY/q2a-comment-collapse

Here's what it looks like:

Exciting, huh?

Set the number of comments to show and customize the text (sing/plural) in admin/plugins.

by
Ooh, awesome! I was gonna do something like this :)
by
Notice: Undefined index: hidden in /home/.../qa-include/qa-theme-base.php on line 1621

notice can be fixed by adding

'hidden' => false,

on line 32, file qa-collapse-layer.php (and maybe same on line 25), result is something like:

$c_list[] = array(
'title' => $text,
'hidden' => false,
.....
by
thanks, fixed.

2 Answers

+1 vote
by

Okay, I couldn't resist... I see Gideon has added collapsing comments to this site, only backwards.  So, now this plugin does that too:


choose between showing "more" comments, and showing "previous" comments (as above) via admin/plugins

by
i love so much all your plugins!! you are my hero!
by
Sorry our work overlapped... :)
by
not at all - always nice to see more features in the core :)
0 votes
by
This pluging dones't seem to Work with Q2A 1.7, how can I use it with Q2A 1.7 please ?
by
Hello @ShNaYkHs... This feature is provided in core now so you do not need this plugin. All you need to do is to enabled options in

admin > viewing > Partially hide comments if more than: and If partially hidden, show most recent:

Fill in the number of comments you want to hide and after how many comments.

Hope this helps...
by
This is perfect, thanks very much :)
...