PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Display Membership Level

s2Member Plugin. A Membership plugin for WordPress®.

Display Membership Level

Postby startasocialnetwork » June 10th, 2011, 11:56 am

I'm trying to figure out how to display someone's Membership Level along with their profile, like many forums (including this one: "Registered User" or "Support Rep." for Cristian) do.

I know the shortcode to display a member's level to themselves, but how can I display someone's level for all members to see? I'd want it to match the names assigned through s2Member...
User avatar
startasocialnetwork
Registered User
Registered User
 
Posts: 23
Joined: October 8, 2010
Location: Vancouver, BC

Re: Display Membership Level

Postby Jason Caldwell » June 14th, 2011, 12:17 am

Thanks for the excellent question.

You can use this API Constant to get the current User's Membership Level Label.
This code snippet can go into a Post/Page editor for WordPress.
Code: Select all
[s2Get constant="S2MEMBER_CURRENT_USER_ACCESS_LABEL" /]

Also see this documentation:
viewtopic.php?f=40&t=9011&src_doc_v=110605#src_doc_S2MEMBER_CURRENT_USER_ACCESS_LABEL
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Display Membership Level

Postby Cristián Lávaque » June 14th, 2011, 12:44 am

Jason, I think he's trying to get the label for users that aren't the current one, so I'll quote what you explained in the other thread:

Code: Select all
$user_label = c_ws_plugin__s2member_user_access::user_access_label($user_id); 


viewtopic.php?f=40&t=9477&src_doc_v=110605#src_doc_user_access_label%28%29

I hope that helps. :)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010


Return to s2Member Plugin

Who is online

Users browsing this forum: No registered users and 1 guest

cron