Page 1 of 1

Hiding Pages to User Level 4

PostPosted: December 2nd, 2011, 12:15 pm
by horse43
first of all would like to thank PrimoThemes for this great plugin!

Anyways, i'm looking to use API Scripting in the Require Custom Capabilities? section in the page editing.

Im wondering what code i need to use to make a certain page only viewable to those user with a level less than 4.

When i add an api code the parenthases go away and so im not sure what codes i need to use.

So if anyone could send the line of code i need to put in the box to have unregistered guest, level1, level2, and level3 users see a certain page i'd appreciate it!

Happy Holidays

Re: Hiding Pages to User Level 4

PostPosted: December 2nd, 2011, 12:19 pm
by Eduan
You can check under WP Admin -> s2Member -> API Scripting -> Simple/Shortcode Conditionals,
or under WP Admin -> s2Member -> API Scripting -> Advanced/PHP Conditionals, you can check this video for more info:
http://www.s2member.com/advanced-conditionals-video/

You could also sell specific post/page access, check this video for how to use those:
http://www.s2member.com/specific-posts-pages-video/

Hope this helps. :)

Re: Hiding Pages to User Level 4

PostPosted: December 4th, 2011, 4:36 am
by Cristián Lávaque
Horse, I'm not sure I understand your question. Do you mean that anyone below Level 4 should be taken to a certain same page? or those levels you mentioned should see content custom to each in the same page?

Re: Hiding Pages to User Level 4

PostPosted: December 5th, 2011, 1:45 am
by horse43
Cristián Lávaque wrote:Horse, I'm not sure I understand your question. Do you mean that anyone below Level 4 should be taken to a certain same page? or those levels you mentioned should see content custom to each in the same page?


Thanks for the help guys. I have yet to figure this out. So i have a set couple of "pitch" pages for guests and non members to try to get them to sign up for the paid subscription.

Once they are paid users, i want these pages to be invisible to them. so the pitch pages can only be viewed by level0 or guests.

So then when i go to edit the page and under the Require Custom Capabilities? I enter the shortcodes or the php script, but you can't enter () or !.

Hope this helps!

Re: Hiding Pages to User Level 4

PostPosted: December 6th, 2011, 2:03 pm
by horse43
Let me try this again,

So we can restrict pages to "Require Level #3 or Higher" in the S2Member box on the page edit screen.

But is it possible and how do we "Require Level #3 or Lower"??

So we have to put code into the funtions.php or page.php? i've done the due diligence of searching past posts and looking at the videos but have not come up with anything.

Any help would be appreciated!

Re: Hiding Pages to User Level 4

PostPosted: December 6th, 2011, 2:24 pm
by Eduan
horse43 wrote:But is it possible and how do we "Require Level #3 or Lower"??

The best way I can think of doing this is by offering CCap only to the level 1-3 buttons, and so only these levels will be able to access that page.

You can check this video on how to do that:
http://www.s2member.com/custom-capabilities-video/