• Resolved mercuryfenix

    (@mercuryfenix)


    I am having troubles finding the best way to add a login form widget without having to go to the default login page. I want to have a login form right on the homepage and it would be ideal to be able to put it anywhere else too. I have only found 1 function in the codex called wp_signon but there is a lack of information on usage and examples.

    Any help is appreciated!

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    Thread Starter mercuryfenix

    (@mercuryfenix)

    I was hoping there is a simple procedure, maybe make the form and submit it to a function. I am hoping to learn the procedure for use with my themes instead of relying on other plugins.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    Ah. Well, no, there’s nothing in WordPress specifically to generate the form for you. Basically though, if you make the form have the same fields as the form on the normal login page, then it will work. You can also add a hidden redirect field to redirect where you want to go to for the after-login page.

    Look at the form created by that plugin, then just copy the HTML form itself.

    Thread Starter mercuryfenix

    (@mercuryfenix)

    Right, I would create the form. Ideally, my own code would show the form, then upon submission via Ajax (or page refresh), it would log the user in.

    I wanted to leave the code hijacking to a last resort but it might have to do.

    Is there anything you can tell me about the wp function wp_signon?

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    .. I’m really not following you here. You don’t need to know that function in order to log in. You don’t need to know any functions, in fact. Just submit the form with the proper parameters to the wp-login.php script and it logs you in. Done.

    Thread Starter mercuryfenix

    (@mercuryfenix)

    Ah I see. I couldn’t find any documentation on anything like this.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Creating a Login “Widget”’ is closed to new replies.