Page 1 of 1

Can You Restrict Part of a Page?

PostPosted: January 24th, 2012, 3:20 pm
by blogman
Is there a way, possibly using short codes, to restrict sections of a page?

Thanks
Blogman

Re: Can You Restrict Part of a Page?

PostPosted: January 24th, 2012, 3:27 pm
by Bruce C
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

Re: Can You Restrict Part of a Page?

PostPosted: January 24th, 2012, 5:31 pm
by blogman
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

Re: Can You Restrict Part of a Page?

PostPosted: January 24th, 2012, 5:34 pm
by Bruce C
hmm, sorry in regular PHP code that works.

Happy you got it working