Title: theme_my_login function instance issue
Last modified: April 22, 2017

---

# theme_my_login function instance issue

 *  [egemenerd](https://wordpress.org/support/users/egemenerd/)
 * (@egemenerd)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/theme_my_login-function-instance-issue/)
 * Hi,
 * I’m trying to use theme_my_login function ( [http://docs.thememylogin.com/category/developer-documentation/](http://docs.thememylogin.com/category/developer-documentation/))
   to add a login form to the header. The code is;
 *     ```
       <?php               
       $theme_my_login_args = array(
           'instance' => '999',
           'default_action' => 'login',
           'show_title' => false
       );
       theme_my_login( $theme_my_login_args );
       ?>
       ```
   
 * The problem is instance is not working. The form’s id is always “theme-my-login1”.
   All other options are working. I also tried to use “theme-my-login” shortcode(
   with do_shortcode function) but the result is the same. Do you have any idea 
   about why it is not working? Any help is appreciated 🙁

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Jeff Farthing](https://wordpress.org/support/users/jfarthing84/)
 * (@jfarthing84)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/theme_my_login-function-instance-issue/#post-9058300)
 * The instance actually can’t be passed, it is auto-assigned. The first instance,`
   0`, is always reserved as the main instance. So, you pretty much guess that your
   header instance will always be `1`.
 *  Thread Starter [egemenerd](https://wordpress.org/support/users/egemenerd/)
 * (@egemenerd)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/theme_my_login-function-instance-issue/#post-9059252)
 * But when I add a form to a page with the shortcode (from post edit page), instance
   is working. If I add the same shortcode directly to the page with “do_shortcode”,
   it is not working. Isn’t that weird?
 * ![](https://i0.wp.com/cdn.pbrd.co/images/7SfO4L4CR.png?ssl=1)
 * ![](https://i0.wp.com/cdn.pbrd.co/images/7Sihd7cDr.png?ssl=1)

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘theme_my_login function instance issue’ is closed to new replies.

 * ![](https://ps.w.org/theme-my-login/assets/icon-256x256.png?rev=1891232)
 * [Theme My Login](https://wordpress.org/plugins/theme-my-login/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/theme-my-login/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/theme-my-login/)
 * [Active Topics](https://wordpress.org/support/plugin/theme-my-login/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/theme-my-login/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/theme-my-login/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [egemenerd](https://wordpress.org/support/users/egemenerd/)
 * Last activity: [8 years, 11 months ago](https://wordpress.org/support/topic/theme_my_login-function-instance-issue/#post-9059252)
 * Status: not resolved