Quantcast
Channel: Topic Tag: plugin | WordPress.org
Viewing all articles
Browse latest Browse all 26892

Ipstenu (Mika Epstein) on "Multisite Network Login Functionality -- Help?"

$
0
0

Sidebar login isn't that hard.

wp_login_form() is built in, so the trick to it is plunking in the redirect :)

<?php 

global $user_login, $post;

$permalink = get_permalink($post->ID);

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

 ?>

You may also want to redirect if they get the password wrong: http://wordpress.stackexchange.com/questions/15633/how-can-i-redirect-user-after-entering-wrong-password


Viewing all articles
Browse latest Browse all 26892

Trending Articles