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™

Can You Restrict Part of a Page?

s2Member Plugin. A Membership plugin for WordPress®.

Can You Restrict Part of a Page?

Postby blogman » January 24th, 2012, 3:20 pm

Is there a way, possibly using short codes, to restrict sections of a page?

Thanks
Blogman
User avatar
blogman
Registered User
Registered User
 
Posts: 2
Joined: January 24, 2012

Re: Can You Restrict Part of a Page?

Postby Bruce C » January 24th, 2012, 3:27 pm

Yes, you can use the s2If shortcodes to do this:

Code: Select all
Content for everyone
[s2If current_user_can (access_s2member_level1)]
Content for those that have bought s2Member Level1
[/s2If]
[s2If current_user_can (access_s2member_ccap_movies)]
Content for those that have bought the custom capability movies
[/s2If]


You can learn more about this in Dashboard -> s2Member -> API/Scripting -> Simple/Shortcode Conditionals
~Bruce ( a.k.a. Ace )

If you're interested in a Professional Installation, or Custom Coding Job, you can send your request here.

Proud Supporter of:
The Zeitgeist Movement
and Occupy Everything
User avatar
Bruce C
Experienced User
Experienced User
 
Posts: 337
Joined: July 20, 2011

Re: Can You Restrict Part of a Page?

Postby blogman » January 24th, 2012, 5:31 pm

Thanks Bruce
...except for throwing that additional space in the shortcode - between... _can and (

Got it work just like I thought it should
Super
Blogman
User avatar
blogman
Registered User
Registered User
 
Posts: 2
Joined: January 24, 2012

Re: Can You Restrict Part of a Page?

Postby Bruce C » January 24th, 2012, 5:34 pm

hmm, sorry in regular PHP code that works.

Happy you got it working
~Bruce ( a.k.a. Ace )

If you're interested in a Professional Installation, or Custom Coding Job, you can send your request here.

Proud Supporter of:
The Zeitgeist Movement
and Occupy Everything
User avatar
Bruce C
Experienced User
Experienced User
 
Posts: 337
Joined: July 20, 2011


Return to s2Member Plugin

Who is online

Users browsing this forum: No registered users and 2 guests

cron