I would like to make a view that allows me to filter out and display comments, but I noticed comments are not an option in Views. Is there a way to do this in Toolset? Specifically, I need it to pull out the comment that has the most likes on a given post (which is stored in a meta value). Thanks for any help you can offer.
Les langues: Anglais (English )Espagnol (Español )
Fuseau horaire: Europe/London (GMT+00:00)
It is true that Views don't support the comment post type, not sure why but they never have.
You could try creating a View for some other post type, including a query filter for the custom field in question, and then use the wpv_filter_query API filter to modify the argument for the post_type to change it to comments.
I haven't tried it but I expect that it would probably work.
Thanks. Before I dig deeper, aren't comments stored separately (in the "comments" table instead of "posts"), so would it actually work to treat this as a post type for filtering purposes?
Les langues: Anglais (English )Espagnol (Español )
Fuseau horaire: Europe/London (GMT+00:00)
Doh. Of course you are right.
I was taking my cue from the question about using a View to display them and for a moment had it in mind that they were stored as posts with a type of comment, but they are indeed stored in their own table, sorry.
And that means a View cannot be used to display them, even legacy Views only supports posts, taxonomies, and users, there is no support for comments.