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™

Access label in PHP

s2Member Plugin. A Membership plugin for WordPress®.

Access label in PHP

Postby sixagency » May 13th, 2011, 7:25 am

HI,

I am editing theme_functions.php and I would like to add the current user's level or (access Label), after .$current_user->display_name.

How can I do that?
Thank you!
User avatar
sixagency
Registered User
Registered User
 
Posts: 17
Joined: April 11, 2011

Re: Access label in PHP

Postby Cristián Lávaque » May 13th, 2011, 8:46 am

You could try this:

Code: Select all
echo S2MEMBER_CURRENT_USER_ACCESS_LABEL; 


WP Admin -> s2Member -> API / Scripting -> s2Member PHP/API Constants
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

Re: Access label in PHP

Postby sixagency » May 13th, 2011, 10:52 am

Thank you Christian,

You rock as always!!!
User avatar
sixagency
Registered User
Registered User
 
Posts: 17
Joined: April 11, 2011

Re: Access label in PHP

Postby Cristián Lávaque » May 13th, 2011, 11:43 am

:)
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: Bing [Bot] and 0 guests

cron