Get custom post comment
-
Hi,
I have a buddyboss community running and I have several admins for certain sections. Each of these admins can edit a custom post type unique to this admin and section. These cpt posts can have comments. Now I need the comments table in the dashboard to show ONLY those comments, that are related to the post type of the actual logged in admin user. As an idea I need something like this:
function get_admin_related_post_type_comment() {
if HAS_COMMENTS_AT_ALL start loop:if: current_user_has_role: ?admin_cookbook“
show comments to post_cookbuch AND hide all other commentselseif: current_user_has_role: ?admin_nonfiction“
show comments to post_nonfiction AND hide all other commentselseif: current_user_has_role: ?admin_memoire“
show comments to post_memoire AND hide all other commentselseif: current_user_has_role: ?admin_childrensbook“
show comments to post_childrensbook AND hide all other commentselseif: current_user_has_role: ?administrator“
show all comments EXCEPT comments to post_cookbook, post_nonfiction, post_memoire, post_childrensbook.else: stop loop.
}Anybody help me with this?
Thanks
CallyThe page I need help with: [log in to see the link]
- The topic ‘Get custom post comment’ is closed to new replies.