Support » Plugin: WordPress Login :: Red Rokk Widget Collection » [Plugin: WordPress Login :: Red Rokk Widget Collection] Mimic login button action with url?

  • Resolved kanjipad


    First, thanks for a great plug-in. I have your login form in my sidebar and it is now much more professional-looking for users, rather than having to leave the page to login. I have made a couple of small adjustments to your styling and the focus behaviour, which I’ll share in another thread.

    Second, my current question… I have an icon in my header that used to direct users to the wordpress login page. It is not really needed anymore because of your widget, but it is up at the top in an easily reached position, so I would like to keep it if possible and get it to work with your login form. Otherwise, users on small screens have to scroll down to login.

    Is there an href or url address that could mimic the function of your login button, assuming the fields have been auto-filled correctly? (I think I can copy your code to check if the fields are already filled in, so this icon will only be visible when it is usable).

    If this is not possible, that’s fine. Option 2 would be for the icon to move focus to your widget so the user can then hit ‘return’. (I turned off the line in your code that gives your widget automatic focus .)

    I can post a link, if you need it, but the site is very much under construction.



Viewing 5 replies - 1 through 5 (of 5 total)
  • This worked:

    <a href="#" title="Login"> <img src="<?php echo bloginfo('stylesheet_directory');?>/images/Login.png" alt="Login" width="32" height="32" </a>

    [Moderator Note: Please post code or markup snippets between backticks or use the code button. As it stands, your code may now have been permanently damaged/corrupted by the forum’s parser.]

    Sorry, the pasted code went live on me…

    <a href="#" onclick="document.getElementById('loginform').submit(); return false;" title = "Login"> <img src="<?php echo bloginfo('stylesheet_directory');?>/images/Login.png" alt="Login" width="32" height="32" </a>

    Plugin Author Jonathon_at_RedRokk


    Hey Kanji. This version does not really offer anything like that. But hopefully you were able to get the functionality that you wanted with the code that you posted.

    Hi Jonathon,

    Yes, I got it all working nicely.

    I have a button up the top of my header that calls a custom javascript function. That function checks whether the contents of your widget password field have string length>1 and, if so, submits the form. If not, it scrolls your widget into view.

    The automatic focus in your original code did not quite work for me, so I commented out the relevant line of code. It set the focus on the username field, which still left the password field off the page. It also meant the slider at the top of my page was partially out of view when the page first opened.

    May I suggest you have an option, in the next release, of turning off the automatic focusing?

    Anyway, thanks for the plugin. I had a look at several other login options and this was by far the neatest, especially with my minor modifications.


    Craig (Kanjipad).

    Plugin Author Jonathon_at_RedRokk


    Thanks Kanji, for the compliment. I have made a lot of modifications to this plugin that I have not yet pushed to the repository on wordpress. Will let you know when they are.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: WordPress Login :: Red Rokk Widget Collection] Mimic login button action with url?’ is closed to new replies.