Community Support Forums — WordPress® ( Users Helping Users ) — 2011-10-31T23:30:26-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=15663 2011-10-31T23:30:26-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15663&p=50662#p50662 <![CDATA[Re: Redirect based on URL variable...]]>

Statistics: Posted by Cristián Lávaque — October 31st, 2011, 11:30 pm


]]>
2011-10-31T09:18:47-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15663&p=50520#p50520 <![CDATA[Re: Redirect based on URL variable...]]>
Thanks,
Bob

Statistics: Posted by rwilki — October 31st, 2011, 9:18 am


]]>
2011-10-27T23:16:07-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15663&p=49040#p49040 <![CDATA[Re: Redirect based on URL variable...]]> http://s2member.com/contact

I'm guessing you want to have this return to the page either when the person clicks the login link on it, or if he gets taken to the Membership Options and you remind him to login to view the page, right?

You can use variables in both cases to create the redirect_to value. When in the MOP, you have the MOP vars which will include the post/page that bounced the user. WP Admin -> s2Member -> API / Scripting -> Membership Options Page Variables

So you can do something like:

Code:
<?php $p = explode('-', $_GET['s2member_seeking']); ?>
<a href="<?php echo wp_login_url('/?p=' . $p[1]); ?>" title="Login">Login</a>


http://codex.wordpress.org/Function_Ref ... _login_url

I hope this helps. :)

Statistics: Posted by Cristián Lávaque — October 27th, 2011, 11:16 pm


]]>
2011-10-27T08:38:41-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15663&p=48973#p48973 <![CDATA[Re: Redirect based on URL variable...]]>
My url for a protected article might be:

http://www.mydomain.com/news-article-may-15-2011 basically, I want the redirect to go to this article once people have registered or logged in. Essentially bypassing the MO page. I don't see how I could hardcode this in every link on my site since the url is created by my publishing of the post and I would have to manually do this for every article...

Statistics: Posted by rwilki — October 27th, 2011, 8:38 am


]]>
2011-10-26T23:22:46-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15663&p=48943#p48943 <![CDATA[Re: Redirect based on URL variable...]]>
I can tell you that if you add the redirect_to variable to the URL for the login page, that's where the person will be take after login.

http://example.com/login.php?redirect_t ... rson-to-go

Statistics: Posted by Cristián Lávaque — October 26th, 2011, 11:22 pm


]]>
2011-10-26T10:55:05-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15663&p=48854#p48854 <![CDATA[Redirect based on URL variable...]]>
Basically, when a reader clicks on a level #0 or #1 post, they either have to be logged in to the correct level or register/pay. Once a reader logged in, they were redirected to the protected post rather than the Membership Options page.

The hack uses the sidebar-login plugin and the shortcode-exec-php plugin to make it function. There have been a lot of updates to s2Member since I last posted in this forum but I'd like some help with a tweak. I would like to know if I can use the redirect functionality without having to use the login sidebar. In other words, is there a way to pass on the variable in the protected url through the wp login page? Here is my code. Any help would be great. I just find it so annoying that the Membership Options page is mandatory.

Code:
<script type="text/javascript">// <![CDATA[
/* <![CDATA[ */
    jQuery.noConflict();
    jQuery(document).ready(function($){
       $(".redirect_to").val("[s2_redirect]");
    });
/*  */
// ]]></script>

Statistics: Posted by rwilki — October 26th, 2011, 10:55 am


]]>