Trouble adding multiple IDs with wpdiscuz_comments_args
-
Hi,
I’m trying to display all comments from a set of post IDs passed as an array. It looks like wpdiscuz_comments_args should do the trick, but so far no luck. Would love any feedback or suggestions. Here is my basic test code:
add_filter('wpdiscuz_comments_args', function ($args) { global $post; if ($post->ID != 619) { // Only on this post return $args; } $post_ids = array(416,419,422); $args['post_id'] = 0; $args['comment__in'] = $post_ids; return $args; }
I’ve confirmed that the filter fires on the correct post. Is comment__in not supported maybe? Or some other place where the current post ID is getting reset?
Thanks!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Trouble adding multiple IDs with wpdiscuz_comments_args’ is closed to new replies.