Community Support Forums — WordPress® ( Users Helping Users ) — 2011-12-28T20:40:58-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=16556 2011-12-28T20:40:58-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16556&p=59038#p59038 <![CDATA[Re: Redirecting on Login and on Page restriction]]>
angelar wrote:
OMG! I got it. I cant believe it, I just didnt set up the membership options page correctly! I didnt choose one!! Im not even blonde:>


lol :)

I'm glad you figured out what the problem was.

Statistics: Posted by Cristián Lávaque — December 28th, 2011, 8:40 pm


]]>
2011-12-28T20:38:40-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16556&p=59037#p59037 <![CDATA[Re: Redirecting on Login and on Page restriction]]>
philipt18 wrote:
Also, is there a way to do thing like recognize all pages that are children of a specific page (so I don't have to return to this code and keep adding page IDs)?


You may want to try working with these functions:
http://codex.wordpress.org/Function_Ref ... e_children
http://codex.wordpress.org/Function_Ref ... _ancestors

philipt18 wrote:
So back to my question above, am I redirecting to multiple pages, or creating multiple sections on the Member Options page? An example or two would be greatly appreciated. Thanks.


You'd be adding alternative content to the same Membership Options page and show the right each based on the conditionals you create. For example:

Code:
<?php
$restricted_pages 
= array(4, 5, 76, 89);
if (isset($_GET['_s2member_seeking']['page']) && in_array((int) stripslashes($_GET['_s2member_seeking']['page']), $restricted_pages)) { ?>
That page requires a paid membership. Get it now [button]
<?php } ?>


Other examples: WP Admin -> s2Member -> API / Scripting -> Membership Options Variables -> Code Samples

Statistics: Posted by Cristián Lávaque — December 28th, 2011, 8:38 pm


]]>
2011-12-28T19:56:14-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16556&p=59035#p59035 <![CDATA[Re: Redirecting on Login and on Page restriction]]> Statistics: Posted by angelar — December 28th, 2011, 7:56 pm


]]>
2011-12-28T19:32:47-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16556&p=59034#p59034 <![CDATA[Re: Redirecting on Login and on Page restriction]]>
Could you post the URL to your Membership Options Page? As well as a screenshot of the edit page for it.

And another of the Membership Options page panel, please. WP Admin -> s2Member -> General Options -> Membership Options Page

Statistics: Posted by Cristián Lávaque — December 28th, 2011, 7:32 pm


]]>
2011-12-27T13:51:43-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16556&p=58950#p58950 <![CDATA[Re: Redirecting on Login and on Page restriction]]> instead of the restriction option from the dashboard? In this one example I want only the level1 subscriber to see the page and sidebar. When I used conditional shortcodes on this page the user did see the message that they didnt have access but still could view the sidebar.

I would like every restricted page to redirect to the members options page.

In the S2member API/Scripting should I not use THE EASY WAY and other options below that? I am new to PHP but am willing and want to learn it. An example of redirect code would be great on how I can accomplish this. I see many examples in the s2member API/scripting but I dont see any URLS to actually force the user to the members page, and I dont see where the URLS for the membership page are suppose to go.

Any help greatly appreciated. I really want this to work for me.

Statistics: Posted by angelar — December 27th, 2011, 1:51 pm


]]>
2011-12-27T06:23:54-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16556&p=58908#p58908 <![CDATA[Re: Redirecting on Login and on Page restriction]]>
Also, is there a way to do thing like recognize all pages that are children of a specific page (so I don't have to return to this code and keep adding page IDs)?

In one example, I have a Resources Page which is viewable by everyone, but which links to a series of child pages which are mostly only available to registered users (level 0). When someone tries to access one of those child pages who is not logged in, I want to explain what the resource pages are, and how to gain access to them. Essentially this is the 'user is not registered' page. Theoretically I might have a few of these pages for other areas of the site that are restricted.

In another example, I have a page with children that is only accessible to paid members (level 1). With those pages, I want to show a different explanation about membership and its benefits, and how to become a member. Essentially, this is the 'user is not a member' page.

So back to my question above, am I redirecting to multiple pages, or creating multiple sections on the Member Options page? An example or two would be greatly appreciated. Thanks.

Statistics: Posted by philipt18 — December 27th, 2011, 6:23 am


]]>
2011-12-27T05:04:52-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16556&p=58894#p58894 <![CDATA[Re: Redirecting on Login and on Page restriction]]> WP Admin -> s2Member -> API / Scripting -> Membership Options Page Variables

If you want to have different Login Welcome Pages based on the user's level, you could have a PHP conditional there that will redirect with JavaScript to the page for his level.

Statistics: Posted by Cristián Lávaque — December 27th, 2011, 5:04 am


]]>
2011-12-26T11:46:02-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16556&p=58834#p58834 <![CDATA[Re: Redirecting on Login and on Page restriction]]>
As I said before, the conditionals, I think are the best option in order to make it simple.

I hope this helps. :)

Statistics: Posted by Eduan — December 26th, 2011, 11:46 am


]]>
2011-12-26T11:32:53-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16556&p=58833#p58833 <![CDATA[Re: Redirecting on Login and on Page restriction]]>
Also, where can I find out how to define what the user sees when they are rejected from a specific page? Thanks.

Statistics: Posted by philipt18 — December 26th, 2011, 11:32 am


]]>
2011-12-26T10:57:06-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16556&p=58829#p58829 <![CDATA[Re: Redirecting on Login and on Page restriction]]> Check this video on how to do that:
http://www.s2member.com/paypal-modifica ... ons-video/

You might also be interested in conditionals (mentioned in video), check under WP Admin -> s2Member -> API / Scripting -> Simple/Shortcode Conditionals.

Hope this helps. :)

Statistics: Posted by Eduan — December 26th, 2011, 10:57 am


]]>
2011-12-26T10:47:23-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16556&p=58827#p58827 <![CDATA[Redirecting on Login and on Page restriction]]>
1) When a user logs in, can I redirect the user to a different page based on their level? i.e. Level 0 goes to one page, Level 1 goes to another page, etc.?

2) When a user accesses a page or post that they are not allowed to access, right now everyone for every page gets sent to the same explanation page (which must be public). Is there a way to specify for a page which explanatory page a user gets sent to? or sending users to different explanatory pages based on their level?

For example, let's say I have three tiers of users - non-logged in, logged-in free subscribers, and paid members. If some pages are only visible to people that are logged in, then it makes sense that the explanatory page would explain why you should register for the site, but if there is a page that is only accessible to members, and non-logged in users can't even see it normally, then it doesn't make sense to explain about registering for the site, but instead the page should explain why they should pay for the membership tier.

Even better, for some pages I'd like to be able to explain specifically why the user should register or pay for membership, i.e. I'd like to describe what is beneficial about that specific restricted resource.

Is there any way to do either of these? Thanks.

Statistics: Posted by philipt18 — December 26th, 2011, 10:47 am


]]>