| User | Post |
|
10:38 pm September 19, 2008
| Stewart
Member
| | | |
|
| posts 4 |
|
|
I'm new to WP as well as RS, so I apologize if this is something that should be obvious. I've set up a members-only area, and made it exclusive to a new RS group called "members". That's working fine. I also have a page that serves as a gateway to the members-only section, and I'd like to make it as user-friendly as possible, so I'd like to have it display one blurb if you're not logged in, and a different blurb if you are logged in but not in the "members" group. I can do the first with the WP function is_user_logged_in(), but I'm not sure how to do the second part. Is there something like an is_user_in_group() function?
|
|
|
10:27 am September 26, 2008
| Kevin
Admin
| | | |
|
| posts 2402 |
|
|
Sorry I'm late responding to this. You can use the following code to determine group membership:
global $current_user; $members_group_id = 6; // set to your group's actual ID if ( isset( $current_user->groups[$members_group_id] ) ) display_stuff();
|
|
|
3:29 pm September 23, 2009
| unknowncity
New Member
| | | |
|
| posts 1 |
|
|
I have a semi-related question. I’m introducing a special user role to my site, the “Gold” members, which is for people who have chipped in a few bucks to keep it going. I’m using RS to define the new user role, and that’s working fine. What I’m looking to do is create a TOTALFARK like icon for these folks, which would display next to their user name every time they make a comment.
The problem is, I can’t figure out how to get WordPress (I’m on 2.8.4) to display just one specific, custom user role, and then to output that as an image rather than as just the user role title. I'd like the icons to stick to each comment, regardless of whether or not the "Gold" member is still logged in.
Any ideas?
|
|
|
8:55 pm October 5, 2009
| Kevin
Admin
| | | |
|
| posts 2402 |
|
|
unknowncity said:
I’m introducing a special user role to my site, the “Gold” members… using RS to define the new user role, and that’s working fine… I can’t figure out how to get WordPress to display just one specific, custom user role, and then to output that as an image rather than as just the user role title.
What exactly did you do to "define a new user role" for them? Assign an RS General Role?
|
|