Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator keesiemeijer

    (@keesiemeijer)

    It redirects to the same page by default. If you want it to redirect to your wp-admin try something like this:
    <?php wp_login_form('redirect=/wp-admin'); ?>

    Thread Starter Azim Hikmatov

    (@seezer)

    I don’t need it to go to admin. I want it to display the results of authorizations, like “Welcome, username” or whatever… Or “wrong password”. Now it just doesn’t give me anything, it reloads and shows the form again – how am I supposed to know if I logged in or failed?

    Moderator keesiemeijer

    (@keesiemeijer)

    try something like this:

    global $user_login;
    if (is_user_logged_in()) {
        echo 'Hello, ', $user_login, '. <a href="', wp_logout_url(), '" title="Logout">Logout</a>';
    } else {
        wp_login_form();
    }

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

The topic ‘wp_login_form(); not working?’ is closed to new replies.