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™

Hide profile menu items to basic members

s2Member Plugin. A Membership plugin for WordPress®.

Hide profile menu items to basic members

Postby johnegg » July 22nd, 2011, 3:08 am

Hi guys

Again, I cant get over how good this plugin is, and its free! :D

Im using s2member + buddypress. Anyway, I have 2 memberships set up. Both paid but both have a 'media' tab in profile page that can add video & audio. This is only available to premim package but the tab still appears for basic members.

Is it possible to hide the 'media' link in teh profile page sidebar on the basic members profile pages?

Image
User avatar
johnegg
Registered User
Registered User
 
Posts: 8
Joined: July 21, 2011

Re: Hide profile menu items to basic members

Postby Cristián Lávaque » July 22nd, 2011, 2:40 pm

I'm very glad you're liking it so much. :)

For that you could try using the advanced conditionals in your template. WP Admin -> s2Member -> API / Scripting -> Advanced/PHP Conditionals and Advanced/PHP Query Conditionals

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

Re: Hide profile menu items to basic members

Postby johnegg » July 22nd, 2011, 4:19 pm

Thanks again Cristian. Unfortunately I dont know php very well! :(
User avatar
johnegg
Registered User
Registered User
 
Posts: 8
Joined: July 21, 2011

Re: Hide profile menu items to basic members

Postby Cristián Lávaque » July 22nd, 2011, 11:03 pm

Oh, that's fine, many don't. You can get a freelance developer from websites like jobs.wordpress.net, oDesk or eLance. :)
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: Hide profile menu items to basic members

Postby johnegg » July 23rd, 2011, 1:16 am

Cool, think I have a guy that can do it anyway. Cheers for the support!
User avatar
johnegg
Registered User
Registered User
 
Posts: 8
Joined: July 21, 2011

Re: Hide profile menu items to basic members

Postby Cristián Lávaque » July 25th, 2011, 1:52 pm

:)
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: Hide profile menu items to basic members

Postby johnegg » July 25th, 2011, 3:04 pm

Got this sorted!

Here is the code the programmer put in to functions.php in case anyone needs it

Code: Select all
/* Place this code in wp-content/plugins/buddypress/bp-themes/buddyboss/functions.php to 
 * remove the 'Media' link from appearing on non-premium profile pages. You can paste it around line 26.
 */

// Remove the 'Media' link from the menu appearing on the left-hand side of the profile page, 
// *if* the profile owner isn't a premium member.

//Load the user associated with the profile we're browsing.
$user_profile = new WP_User$bp->displayed_user->id );

//Check profile owner's access level. This depends on the s2member plugin.
if(!$user_profile->data->wp_capabilities['s2member_level2']){
  unset(
$bp->bp_nav['media']);
}
// END
 
User avatar
johnegg
Registered User
Registered User
 
Posts: 8
Joined: July 21, 2011

Re: Hide profile menu items to basic members

Postby Cristián Lávaque » July 26th, 2011, 2:51 am

That's great! And thanks for sharing the solution! :)
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: Hide profile menu items to basic members

Postby johnegg » July 26th, 2011, 3:15 am

No problemo!
User avatar
johnegg
Registered User
Registered User
 
Posts: 8
Joined: July 21, 2011


Return to s2Member Plugin

Who is online

Users browsing this forum: Bing [Bot], Exabot [Bot], Google [Bot] and 0 guests

cron