Calling Theme My Login templates in a Bootstrap Modal Popup
-
Hopefully someone can help with this. The issue can be found at http://adopt.hatchmedia.ie.
I am using Bootstrap v3 in a WordPress site. The site has a login window for users which I have set to appear as a modal popup when they click ‘login’ from the nav bar.
I am using the Theme My Login plugin to redirect users and to keep them out of the admin area. I have added the code for the login window into the modal pop up.
I hope to also include the Lost Password template in the the same popup and call it using jquery when a user clicks on the Forgot Password link.
At the moment however, anytime I include the lost password template using the following (at the bottom), the site just crashes and does not load anything after the lost password template.
<div class="login" id="theme-my-login"> <form name="loginform" id="loginform" action="/my-account-2/login/" method="post" class="form-horizontal"> <div class="form-group"> <div class="col-sm-12"> <input type="text" name="log" id="user_login" class="form-control" placeholder="Username/Email"/> <span class="glyphicon glyphicon-user"></span> </div> </div> <div class="form-group"> <!--<label for="user_pass" class="col-sm-2 control-label">Password</label>--> <div class="col-sm-12"> <input type="password" name="pwd" id="user_pass" class="form-control input" placeholder="Password" /> <span class="glyphicon glyphicon-lock"></span> </div> </div> <input type="hidden" name="_wp_original_http_referer" value="http://www.adopt.hatchmedia.ie/" /> <div class="form-group" style="display:none;"> <div class="col-sm-offset-2 col-sm-10"> <div class="forgetmenot"> <label> <input name="rememberme" type="checkbox" id="rememberme" value="forever" /> Remember Me </label> </div> </div> </div> <div class="form-group"> <div class="col-sm-12"> <div class="submit col-sm-4"> <input type="submit" name="wp-submit" id="wp-submit" value="Log In" class="btn" /> <input type="hidden" name="redirect_to" value="http://www.adopt.hatchmedia.ie/wp-admin/" /> <input type="hidden" name="instance" value="" /> <input type="hidden" name="action" value="login" /> </div> <div class="col-sm-8 password"> <div><a href="http://www.adopt.hatchmedia.ie/lostpassword/" class="forgot_pass" rel="nofollow">Forgot your password?</a></div> </div> </div> </div> <div class="form-group register"> Not Registered? <a href="#">Contact us here!</a> </div> </form> </div> <div class="lost-password"> <!--CRASHES HERE--> <?php include (TEMPLATEPATH . '/lostpassword-form.php'); ?> </div>
If I try the below, found here, I simply get the default login form loading as opposed to the lost password template.
<?php theme_my_login( 'lostpassword_template' ); ?>
Hopefully someone can point me in the right direction.
- The topic ‘Calling Theme My Login templates in a Bootstrap Modal Popup’ is closed to new replies.