Codex

Function Reference/wp lostpassword url

Contents

Description

This Template Tag returns the URL that allows the user to retrieve the lost password.

Usage

 <?php echo wp_lostpassword_url$redirect ); ?> 

Parameters

$redirect
(string) (optional) URL to redirect to after retrieving the lost password.
Default: None

Examples

Default Usage

<a href="<?php echo wp_lostpassword_url(); ?>" title="Lost Password">Lost Password</a>

Lost Password and Redirect to Current Page

<a href="<?php echo wp_lostpassword_url( get_permalink() ); ?>" title="Lost Password">Lost Password</a>

Lost Password and Redirect to Homepage

<a href="<?php echo wp_lostpassword_url( get_bloginfo('url') ); ?>" title="Lost Password">Lost Password</a>

Notes

  • Uses: apply_filters() Calls 'lostpassword_url' hook on HTML link content.

Change Log

Since: 2.8.0

Source File

wp_lostpassword_url() is located in wp-includes/general-template.php.

Related

is_user_logged_in, wp_login_url, wp_logout_url, wp_lostpassword_url, wp_logout, wp_loginout, wp_register

See also index of Function Reference and index of Template Tags.