• Resolved DC38746

    (@dc38746)


    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)
  • Plugin Support gVectors Support

    (@gvectorssupport)

    We’re really sorry, but wpDiscuz is designed to display comments under certain posts. Even if you find a way to include the comments from one post under another, there is not any guarantee that it’ll work fine.

Viewing 1 replies (of 1 total)
  • The topic ‘Trouble adding multiple IDs with wpdiscuz_comments_args’ is closed to new replies.