Redirect based on URL variable...
Posted: October 26th, 2011, 10:55 am
This is a new question based on an old thread. With the help of another forum user (joeboydston) I was able to make s2Member function more intuitively.
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.
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: Select all
<script type="text/javascript">// <![CDATA[
/* <![CDATA[ */
jQuery.noConflict();
jQuery(document).ready(function($){
$(".redirect_to").val("[s2_redirect]");
});
/* */
// ]]></script>