title: Calling Theme My Login templates in a Bootstrap Modal Popup
body: <p>Hopefully you can help with this.  The issue can be found at <a href="http://adopt.hatchmedia.ie" rel="nofollow">http://adopt.hatchmedia.ie</a>.  </p>
  
  <p>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. </p>
  
  <p>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.</p>
  
  <p>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.  </p>
  
  <p>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.  </p>
  
  <pre><code>&lt;div class="login" id="theme-my-login"&gt;
                      &lt;form name="loginform" id="loginform" action="/my-account-2/login/" method="post" class="form-horizontal"&gt;
                          &lt;div class="form-group"&gt;
  
                                  &lt;div class="col-sm-12"&gt;
                                      &lt;input type="text" name="log" id="user_login" class="form-control" placeholder="Username/Email"/&gt;
                                      &lt;span class="glyphicon glyphicon-user"&gt;&lt;/span&gt;
                                  &lt;/div&gt;
                           &lt;/div&gt;
                          &lt;div class="form-group"&gt;
                              &lt;!--&lt;label for="user_pass" class="col-sm-2 control-label"&gt;Password&lt;/label&gt;--&gt;
                              &lt;div class="col-sm-12"&gt;
                                  &lt;input type="password" name="pwd" id="user_pass" class="form-control input" placeholder="Password" /&gt;
                                  &lt;span class="glyphicon glyphicon-lock"&gt;&lt;/span&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                              &lt;input type="hidden" name="_wp_original_http_referer" value="http://www.adopt.hatchmedia.ie/" /&gt;
  
                          &lt;div class="form-group" style="display:none;"&gt;
                              &lt;div class="col-sm-offset-2 col-sm-10"&gt;
                                  &lt;div class="forgetmenot"&gt;
                                      &lt;label&gt;
                                          &lt;input name="rememberme" type="checkbox" id="rememberme" value="forever" /&gt; Remember Me
                                      &lt;/label&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                          &lt;div class="form-group"&gt;
                              &lt;div class="col-sm-12"&gt;
                                  &lt;div class="submit col-sm-4"&gt;
                                      &lt;input type="submit" name="wp-submit" id="wp-submit" value="Log In" class="btn" /&gt;
                                      &lt;input type="hidden" name="redirect_to" value="http://www.adopt.hatchmedia.ie/wp-admin/" /&gt;
                                      &lt;input type="hidden" name="instance" value="" /&gt;
                                      &lt;input type="hidden" name="action" value="login" /&gt;
                                  &lt;/div&gt;
                                  &lt;div class="col-sm-8 password"&gt;
                                      &lt;div&gt;&lt;a href="http://www.adopt.hatchmedia.ie/lostpassword/" class="forgot_pass" rel="nofollow"&gt;Forgot your password?&lt;/a&gt;&lt;/div&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                          &lt;div class="form-group register"&gt;
                              Not Registered? &lt;a href="#"&gt;Contact us here!&lt;/a&gt;
                          &lt;/div&gt;
                      &lt;/form&gt;
  
                  &lt;/div&gt;
  
  
  
                  &lt;div class="lost-password"&gt;
                  &lt;!--CRASHES HERE--&gt;
  
                      &lt;?php include (TEMPLATEPATH . '/lostpassword-form.php'); ?&gt;
                  &lt;/div&gt;
  </code></pre>
  
  <p>If I try the below, found <a href="http://www.jfarthing.com/development/theme-my-login/theme_my_login/" rel="nofollow">here</a>, I simply get the default login form loading as opposed to the lost password template.</p>
  
  <pre><code>&lt;?php theme_my_login( 'lostpassword_template' ); ?&gt;
  </code></pre>
  
  <p>Hopefully someone can point me in the right direction.</p>
  
  <p><strong>Edit</strong></p>
  
  <p>Below is the code for the lostpassword-form.php:</p>
  
  <pre><code>&lt;?php
  /*
  If you would like to edit this file, copy it to your current theme's directory and edit it there.
  Theme My Login will always look in your theme's directory first, before using this default template.
  */
  ?&gt;
  &lt;div class="login" id="theme-my-login&lt;?php $template-&gt;the_instance(); ?&gt;"&gt;
      &lt;?php $template-&gt;the_action_template_message( 'lostpassword' ); ?&gt;
      &lt;?php $template-&gt;the_errors(); ?&gt;
      &lt;form name="lostpasswordform" id="lostpasswordform&lt;?php $template-&gt;the_instance(); ?&gt;" action="&lt;?php $template-&gt;the_action_url( 'lostpassword' ); ?&gt;" method="post"&gt;
          &lt;p&gt;
              &lt;label for="user_login&lt;?php $template-&gt;the_instance(); ?&gt;"&gt;&lt;?php _e( 'Username or E-mail:' ); ?&gt;&lt;/label&gt;
              &lt;input type="text" name="user_login" id="user_login&lt;?php $template-&gt;the_instance(); ?&gt;" class="input" value="&lt;?php $template-&gt;the_posted_value( 'user_login' ); ?&gt;" size="20" /&gt;
          &lt;/p&gt;
  
          &lt;?php do_action( 'lostpassword_form' ); ?&gt;
  
          &lt;p class="submit"&gt;
              &lt;input type="submit" name="wp-submit" id="wp-submit&lt;?php $template-&gt;the_instance(); ?&gt;" value="&lt;?php esc_attr_e( 'Get New Password' ); ?&gt;" /&gt;
              &lt;input type="hidden" name="redirect_to" value="&lt;?php $template-&gt;the_redirect_url( 'lostpassword' ); ?&gt;" /&gt;
              &lt;input type="hidden" name="instance" value="&lt;?php $template-&gt;the_instance(); ?&gt;" /&gt;
              &lt;input type="hidden" name="action" value="lostpassword" /&gt;
          &lt;/p&gt;
      &lt;/form&gt;
      &lt;?php $template-&gt;the_action_links( array( 'lostpassword' =&gt; false ) ); ?&gt;
  &lt;/div&gt;
  </code></pre>