Hi David, thanks for your inquiry!
s2Member sends data about the page the user was redirected from to the Membership Options Page when they are redirected. You can use the $_GET[‘_s2member_seeking’] array in the URL to create a form that will do this.
Here’s an example of a simple form that works this way (remember that to do this you need a PHP Execution plugin installed to use PHP in a WordPress page/post)
<?php
$s2member_seeking = $_GET['_s2member_seeking'];
if($s2member_seeking)
{
if($s2member_seeking['type'] === 'post')
$action = site_url().'/wp-login.php?redirect_to=/p='.$s2member_seeking['post'];
else if($s2member_seeking['type'] === 'page')
$action = site_url().'/wp-login.php?redirect_to=/page='.$s2member_seeking['page'];
}
?>
<form method="post" action="<?php echo $action; ?>">
<input type="text" name="log" />
<input type="text" name="pwd" />
<input type="submit" value="Sign In" />
</form>
Remember that the [‘type’] value affects how this work, and you made need to change things to get this to work correctly with your WordPress® Setup!
I hope this helps!