Languages: English • Español • 日本語 (Add your language)
This Template Tag returns the URL that allows the user to log in to the site.
<?php echo wp_login_url( $redirect ); ?>
<a href="<?php echo wp_login_url(); ?>" title="Login">Login</a>
<a href="<?php echo wp_login_url( get_permalink() ); ?>" title="Login">Login</a>
<a href="<?php echo wp_login_url( home_url() ); ?>" title="Login">Login</a>
$redirect
argument must be absolute, such as http://example.com/mypage/. For best results, use site_url( '/mypage/ ' )
.Since: 2.7.0
wp_login_url() is located in wp-includes/general-template.php
.
Login Tags:
is_user_logged_in(),
wp_login_form(),
wp_loginout(),
wp_logout(),
wp_register()
Login URLs:
wp_login_url(),
wp_logout_url(),
wp_lostpassword_url(),
wp_registration_url()