Displaying comments from specific user group (1 post)

  1. abrucius
    Posted 4 years ago #


    I have 2 user groups on my website. Under each posts I would like to show comments by users of those groups in their respective, separate areas. Let's say first a couple of comments made by users that belong to group A, and below them some comments from users in group B.

    I was playing around with function get_approved_comments, as it uses the sql formula to extract comments from the database, but it doesnt seem to work - I expanded it to select info from wp_comments table and wp_usermeta where metakey='wp_user_role' and metavalue = '2' or '3' (depending on which user group I want to show comments from - it works when executed in plain phpmyadmin).

    Can you advise if I have to make changes in some other functions too? perhaps get_comments? How would you tackle this problem?


Topic Closed

This topic has been closed to new replies.

About this Topic