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™

Hiding Pages to User Level 4

s2Member Plugin. A Membership plugin for WordPress®.

Hiding Pages to User Level 4

Postby horse43 » December 2nd, 2011, 12:15 pm

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
User avatar
horse43
Registered User
Registered User
 
Posts: 4
Joined: September 17, 2011

Re: Hiding Pages to User Level 4

Postby Eduan » December 2nd, 2011, 12:19 pm

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. :)
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: Hiding Pages to User Level 4

Postby Cristián Lávaque » December 4th, 2011, 4:36 am

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?
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: Hiding Pages to User Level 4

Postby horse43 » December 5th, 2011, 1:45 am

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!
User avatar
horse43
Registered User
Registered User
 
Posts: 4
Joined: September 17, 2011

Re: Hiding Pages to User Level 4

Postby horse43 » December 6th, 2011, 2:03 pm

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!
User avatar
horse43
Registered User
Registered User
 
Posts: 4
Joined: September 17, 2011

Re: Hiding Pages to User Level 4

Postby Eduan » December 6th, 2011, 2:24 pm

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/
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] and 1 guest

cron