Hi ostii,
Thanks for your message. No, unfortunately you can’t restrict the comments by category. WordPress has a really poor mechanism for fetching comments, which we’re kind of stuck with in the plugin. You can restrict the comments to individual posts using a code snippet (let me know if you’re interested) but not by category.
Andy
Thread Starter
ostii
(@ostii)
Hi Andy, thanks for your prompt reply.
Yes please, I’d love the codes snippet to restrict comments to individual posts.
Yeah no problem. I’ve just added a page to our Knowledge Base to show how to do this: https://barn2.com/kb/displaying-comments-for-specific-posts/
Thread Starter
ostii
(@ostii)
Thanks @andykeith
Is there by any chance a code snippet to show posts in a specific category?
Thread Starter
ostii
(@ostii)
Also, is there a way to have one page on the website show comments from selected posts (or a category) of posts and another page show other comments from other selected posts (or a category) of posts?
Our Challenge is that we’re running courses and we want a recent comments thread just for the people within a particular course.
Hi,
No, as I mentioned earlier there isn’t an option in the plugin to retrieve comments for posts in a given category. WordPress doesn’t offer a way to do this (not a direct way anyway), so to achieve that you would need some custom development.
The code snippet I sent above can be used to display comments from selected posts, and you can display comments on any page using the [better_recent_comments]
shortcode (see the plugin description for more info on this).