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™

How to hide content from users on template pages

s2Member Plugin. A Membership plugin for WordPress®.

How to hide content from users on template pages

Postby hazardous_waster » January 25th, 2012, 5:06 am

Hello all!

I'm looking at using S2 member on another one of my projects and have used it in the past and its been great but I need to use it for something a bit different this time and I'm not sure it has the functionality.

So I can hide and display content depending if you’re logged in or not as such on any page or on any post

[s2If is_user_logged_in()]
This displays if user is loged in
[/s2If]

[s2If is_user_not_logged_in()]
This displays if user is NOT loged in
[/s2If]

But what I need to do is hide actual elements and functionality in a Wordpress template ... so basically what I need to do is something like that as a PHP expression, make sense, is that possible?

Regards Neil Kelsey
User avatar
hazardous_waster
Registered User
Registered User
 
Posts: 12
Joined: May 19, 2011

Re: How to hide content from users on template pages

Postby Eduan » January 25th, 2012, 10:28 am

So you mean hide a special feature of the theme for example, depending on the level?
Now officially accepting Professional s2Member installations along with Bruce C (a.k.a. Ace).

If you're interested in a Professional s2Member Installation, or a Custom Coding Job, you can send your request here.
User avatar
Eduan
Experienced User
Experienced User
 
Posts: 1154
Joined: August 27, 2011
Location: Taxco de Alarcón, Guerrero, México.

Re: How to hide content from users on template pages

Postby hazardous_waster » January 25th, 2012, 11:34 am

exactly that, so say there is a special PDF you can only download if your a certain user, I want to be able to hide that if your not the correct level and need to do so in the actual page template itself.

Its a bit more complicated then that (its basically a widget of PDF's that I need to hide) but thats the general idea.
User avatar
hazardous_waster
Registered User
Registered User
 
Posts: 12
Joined: May 19, 2011

Re: How to hide content from users on template pages

Postby Eduan » January 25th, 2012, 11:51 am

Well, you could use advanced conditionals, based on custom capabilities.

Check under WP Admin -> s2Member -> API / Scripting -> Custom Capabilities Packages, in there you should find info about custom capabilities, and conditionals for using them.

You could also check these videos:
http://www.s2member.com/custom-capabilities-video/
http://www.s2member.com/advanced-conditionals-video/

Hope this helps. :)
Now officially accepting Professional s2Member installations along with Bruce C (a.k.a. Ace).

If you're interested in a Professional s2Member Installation, or a Custom Coding Job, you can send your request here.
User avatar
Eduan
Experienced User
Experienced User
 
Posts: 1154
Joined: August 27, 2011
Location: Taxco de Alarcón, Guerrero, México.


Return to s2Member Plugin

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot] and 1 guest

cron