Did you look in the documentation on this site before posting?
Look at BuddyPress template tags in the documentation section.
[Edit: having told you to look there, the function you actually need is missing. Try bp_is_my_profile()]
so what does bp_is_my_profile() do? Does it detect if it’s my (the administrators) profile? I also need to detect if it is any moderators profile (I have about 20 moderators).
I was looking through here: https://codex.buddypress.org/developer-docs/buddypress-template-tags/
But I can’t find a function that detects whether they are a moderator or not.
`groups_is_user_mod( $user_id, $group_id )`
`groups_is_user_admin( $user_id, $group_id )`
Check out their definitions in bp-groups.php. They check whether the user is a mod/admin of a particular group.
But that won’t work all that well on a profile page, because a user could be a member of a number of groups, so you won’t have a specific group_id to feed into the function. In what circumstances will the Moderator button appear? If they’re a moderator of *any* groups?
Yeah I was hoping to try and display that they were a moderator if they were a moderator of Any Group, or i’m thinking have on the profile page say something to the effect of: “Moderator of: x group, y group, z group”
I just realized on the forum topic page there is a CSS Class added to each Moderators Topic post, so I could add some CSS to the Forum topics to highlight what the moderators are saying.
to get a list of groups which a member is a moderator/admin of try:
BP_Groups_Member::get_is_admin_of( $user_id )
BP_Groups_Member::get_is_mod_of( $user_id )
(returns an array with groups and total)
How does one use the BP_Groups_Member::get_is_admin_of( $user_id )? I mean where do do I put it in order to only list groups that user is admin or mod of.? This is a bit confusing.