Title: Register link doesn&#039;t work.
Last modified: August 30, 2016

---

# Register link doesn't work.

 *  [marjoleink](https://wordpress.org/support/users/marjoleink/)
 * (@marjoleink)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/register-link-doesnt-work/)
 * When logged out, there’s a “Log In” and a “Register” link. The first shows a 
   login form in a popup, the second does nothing – but the “Create an account” 
   within the Login form does produce the Register” form (and works – I tested creating
   a new user).
 * I haven’t looked at the code yet, but this should be an easy fix.
 * [https://wordpress.org/plugins/simple-ajax-auth/](https://wordpress.org/plugins/simple-ajax-auth/)

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

 *  Thread Starter [marjoleink](https://wordpress.org/support/users/marjoleink/)
 * (@marjoleink)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/register-link-doesnt-work/#post-6208261)
 * Looking through the code, I already found the problem, I think:
 * In the file plugin.php, function simple_ajax_auth_register_link() is missing 
   a closing `<a/>` tag; it should be (line 160 etc.):
 *     ```
       function simple_ajax_auth_register_link( $before = '', $after = '' ) {
               $setup = get_option('simpleajaxauth');
               return ( ! is_user_logged_in() && get_option( 'users_can_register' )) ? ( $before . '<a id="show_register">' . ( isEmpty($setup['register_text']) ? 'Register' : $setup['login_text'] ) . '<a/>' . $after ) : '';
       }
       ```
   
 * **Untested**, but I think the missing end tag is preventing jQuery from recognizing
   the link.
 *  Thread Starter [marjoleink](https://wordpress.org/support/users/marjoleink/)
 * (@marjoleink)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/register-link-doesnt-work/#post-6208273)
 * That was not a complete solution… The link inside the login form has id **pop_signup**,
   while the link on the widget has id **show_register**. The jQuery looks for respectively(#
   pop_login, #pop_signup) and (#show_login, #show_signup).
 * So, if we change the id in the function that generates the link to **show_signup**,
   it starts working:
 *     ```
       function simple_ajax_auth_register_link( $before = '', $after = '' ) {
               $setup = get_option('simpleajaxauth');
               return ( ! is_user_logged_in() && get_option( 'users_can_register' )) ? ( $before . '<a id="show_signup">' . ( isEmpty($setup['register_text']) ? 'Register' : $setup['login_text'] ) . '<a/>' . $after ) : '';
       }
       ```
   
 * That’s more consistent, too.
 * You can mark this as resolved. 🙂

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

The topic ‘Register link doesn't work.’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/simple-ajax-auth.svg)
 * [Simple Ajax Auth](https://wordpress.org/plugins/simple-ajax-auth/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-ajax-auth/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-ajax-auth/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-ajax-auth/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-ajax-auth/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-ajax-auth/reviews/)

## Tags

 * [ajax](https://wordpress.org/support/topic-tag/ajax/)
 * [register](https://wordpress.org/support/topic-tag/register/)

 * 2 replies
 * 1 participant
 * Last reply from: [marjoleink](https://wordpress.org/support/users/marjoleink/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/register-link-doesnt-work/#post-6208273)
 * Status: not resolved