Support » Plugin: WP Modal Login » Enabling the register button via the Widget

  • Resolved JoelStickney


    So, I’m trying to figure out why the “Register” link doesn’t appear at the bottom of the widget? I’ve made sure not to disable it in settings and I can use the Chrome Inspector to un-hide the register box, but I can’t make it show up manually?

    Does that feature just not work in the widget (I haven’t tried the shortcode yet)?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Cole Geissinger


    The register link will only show as long as you have enabled registration in Settings > General.

    Also, make sure you update to the latest version as that fixes the issue of users being able to register when its disabled.

    I have this setting checked, and I have the widget on the homepage, yet I do not see it? Any idea where it could be, or if I can manually place the button where I like?

    As in I have placed the widget on the homepage in the widget menu.

    Plugin Author Cole Geissinger


    If the form fields are empty it returns empty as there is no text to display. Make sure you add in at least the login and logout text.

    If it still doesn’t display, then this might be an issue with your theme and displaying the widgetized area. You can double check this by viewing the page source code and checking if there’s any instance of the widget in there. (Try searching for the world wpml. There should be a class called that)

    Could you explain where I can add in this text? Do I manually need to edit the plugin itself?

    Hello there, I had the same problem and I managed to find a work around.

    1) In the wp-modal-login/includes/class-wp-modal-login.php, in function modal_login_btn and line 548 change:

    $link .= '<a href="#login-box" id="loginbox1" class="login wpml-btn login-window">' . sprintf( _x( '%s', 'Login Text', 'geissinger-wpml' ), sanitize_text_field( $login_text ) ) . '</a></li>';

    $link .= '<a href="#login-box" id="loginbox1" class="login wpml-btn login-window">' . sprintf( _x( '%s', 'Login Text', 'geissinger-wpml' ), sanitize_text_field( $login_text ) ) . '</a></li>';

    2) In file wp-modal-login/js/wp-modal-login.js make the following changes (WP uses minified version, so change to that first):

    a) After Line 7 add: login_id = ‘#login-box’;

    b) In Line 38 add:

    $('#loginbox1').click(function(e) {
    		// Remove any messages that currently exist.
    		$('.wpml-content > p.message').remove();
    		// Get the link set in the href attribute for the currently clicked element.
    		var form_field = '#login';
    		$('.section-container ' + form_field).fadeIn('fast');
    		if(form_field === '#register') {
    		} else {

    3) Then you can add to header.php or in any other template php this piece of code:

    <a href="#register">Register</a>

    This should do the job.

    Happy Coding Everybody!

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Enabling the register button via the Widget’ is closed to new replies.