I have a function that checks if the email address already exists in the database or not.
It's working:
Here's that portion.
->callback(function($val) { return !username_exists($val); }, 'The username you entered already exists.') ->validate('username'); If the username exists, it will through a message saying "The username you entered already exists". What I want after 3 seconds this message is displayed redirects them to login page.
So I've added this line of code to the existing code:
wp_redirect( 'http://localhost/wordpress/wp-login.php', sleep(3)); exit; It does redirect, however I do not see the message anymore. Is there anyway I can display that message and then redirect?
It's a wordpress, so I can't do much in it.