Notifications
Clear all

Paid Addons Support Forum Only

Please note, that here we only support Paid Addons issues and questions.

gVectors Support staff works from 6am to 6pm (GMT+0)

All questions related to wpForo and wpDiscuz free plugins should be asked in the corresponding plugin support forum:

 

wpDiscuz Support Forum wpForo Support Forum

How to list the comments based on meta key?


keerthi92
(@keerthi92)
Active Member
Joined: 3 years ago
Posts: 10
Topic starter  

Hi @tomson

 Thank you for your reply.This is useful for me.Then my another question is how to list the comments based on meta key?

add_action('pre_get_comments', function($query)
{

$query->query_vars['meta_query'] = [
'relation' => 'AND',
[
'key' => 'contest_id',
'value' => $_GET['voteid']
]
];

});

The above code is working for initial load only.When sorting or click load more comments
it is not working in wpdiscuz .Could you please help me

Thank you


Quote
Tom
 Tom
(@tomson)
Support Team Admin
Joined: 6 years ago
Posts: 3719
 

It works fine for as. It also works for all type of loading and pagination. Make sure that key exists fro all comments.

Please make sure you don't have other plugins affecting comment displaying functions and leave a screenshot of the Settings > Discussions admin page.


ReplyQuote
Share:
Scroll to top