This is straightforward.
-
Hook on init to detect the lostpassword page
-
If the user is not coming from your instructions page (which we defined by adding extra query parameter) he’ll be redirected to your custom page
-
In your custom page add the link to lost password page including the extra parameter we set to skip the redirection.
add_action( 'init', 'lostpassword_instructions' ); function lostpassword_instructions() { global $pagenow; if ( $pagenow == 'wp-login.php' && isset( $_REQUEST[ 'action' ] ) && $_REQUEST[ 'action' ] == 'lostpassword' && ! isset( $_REQUEST[ 'skip' ] ) ) { exit( wp_redirect( 'http://domain.com/lost-password-instructions' ) ); } }
Now on your custom page, something like that should work:
$url="http://domain.com/wp-login.php?action=lostpassword&skip=true";
Related Posts:
- Password change when the user login first time
- Remove lost password form and URL
- How to redirect action=register link on the lostpassword page to a different link?
- How to redirect user to specific page based on the input password
- How to redirect a child page to its parent page?
- Redirect after user changes password
- How can I redirect the user to the page they were on when they clicked “Lost Password” using “retrieve_password_message” filter
- php refresh current page?
- Host the wp-admin on another domain?
- WordPress localhost site redirect to live site
- WordPress Redirect All HTTP requests to HTTPS via .htaccess
- wp_redirect() function is not working
- Login redirect to previous page
- Prevent access to single post types
- WordPress install enters an infinite loop
- WordPress HTTPS redirect loop
- 301 redirect not working through .htaccess
- handling login/logout redirects
- Using `auth_redirect` : keeps asking me to login even when I’m logged in
- How can I move/redirect single blog posts from one blog to another?
- 302 redirect instead of 301 after switch to HTTPS
- How do I skip wordpress’s 404 handling?
- Temporary redirect prevents getting $_POST array
- Hacked website redirect, only on desktop, help with restoring it [closed]
- Can I check for maintenance mode before redirecting to subdomain?
- Moving variables from one page to another
- How to create a 301 redirect that doesn’t apply to subsites
- WordPress blocking/preventing viewing of .cgi file in subdirectory [closed]
- Custom Registration page – prevent redirect to wp-login.php?action=register
- https redirect (with .htaccess) redirect loop
- How to target specific user role?
- homepage redirects to login page when user session expires
- How to redirect user to a specific page based on username?
- Redirect blog archive into certain format
- How to publish new posts/pages in root instead of subfolder, but keep old structure in place?
- forward domain name to particular page?
- Contact Form 7 Data to Whatsapp Link
- htaccess 301 Redirect not working for WordPress site
- Auto-detect the redirect url from the original url
- Redirect to Current Page after Login
- Login redirect problem
- Adding rewrite rule dynamically for search results redirecting to 404 URL
- how to setup .htaccess: redirect/ /%postname% to /%category%/%postname%
- How to redirect to specific url if contains specific text in url?
- Redirecting old permalink structure to new in htaccess
- WordPress redirect, output headers already sent
- !is_admin() condition turns true in admin pages
- WordPress index.php seems to perform unwanted redirect 301
- Issue redirecting ‘blog’ to ‘news’ in WordPress using .htaccess
- Custom Login Form – Redirect user to login page if not logged in
- Use two different index pages
- Extra Text in URL
- wp_redirect and current_user_can issues
- Redirect /home to home.php
- WP_List_table with form of method=GET redirects to wrong url after submit
- WordPress localhost site always redirect to live site [closed]
- Redirect wordpress website’s subpage to root [closed]
- My Cloned WP site keeps redirecting to the old one
- Can’t do 301 Redirect, Why?
- Redirect old query string URLs to new add_rewrite_rule URL
- How can I set up a splash page that is redirected to only one time for the visitor? [closed]
- Is there way to redirect all blog post pages to Home page?
- Temporary Infinite Redirect Loop
- Interested in redirection techniques for one-page themes
- Add new post redirection [closed]
- Blog keeps redirecting to the contact page
- WordPress Pagination – 301 Redirect Issue
- Why do my new WordPress pages redirect to home / staging site?
- WordPress multi domain: page redirect to main domain whenever WordPress do the URL guessing issue
- Puzzled at HTTP/2 301 response header
- date based redirect in wordpress
- How to regenerate RSS feed URL like FeedBurner?
- How to avoid redirect 302 in wordpress to the author pages?
- ErrorDocument 410 gives me back a 302 header
- WordPress Staging site is redirecting to live and lost the child theme
- Mailjet Email Subscription + Redirect w/ Custom Template Fails
- htaccess Redirect 301 doesn’t work. How to debug?
- Having a different landing page for returning users
- How to create multiple Rewrite-Rule for various site in single htaccess?
- change home_url and site_url but don’t redirect to home_url and site_url on load
- How do I skip wordpress’s 404 handling?
- All devices on my network redirect me to an old domain
- how to write 301 redirect code for woocommerce product
- WordPress multisite and redirect to subpage
- My WordPress site redirects to port 8082
- wp-login.php redirect problem
- How to redirect 404s that generated for css&JS files?
- Custom, conditional redirect on logout
- International characters in slugs to redirect to
- How to Block WordPress from subdomain?
- WordPress redirect to splash page once a day for the first week
- after logout, get_current_user_id still holds value
- Solution for WordPress URL structure changes and 301 redirects?
- How can I redirect foreigners by IP to other URL in WordPress?
- How to change Ugly link?
- Regex for pdf’s – Old .asp Site folder structure to new WordPress Media Folder(s)
- Redirect if a user has not written a post
- Create a custom redirect link that tracks the first visited page and after submitting form goes to first page using formidable forms plugin? [closed]
- WordPress not use site url when redirect 301
- Redirect certain 404 pages to parent page