Alter Wordpress Theme to detect URL
New here? Learn about Bountify and follow @bountify to get notified of new bounties! x

What can I add to my functions.php in my WordPress theme, that would force teh wp-login.php form to examine the URL for an email address. And if it sees an email address, to place it in the editbox here.

See Image:

Basically, I will be sending my users this url:

So it's a pain to make my users type in their email address again when they come to this page--because the email address is already in the URL.

awarded to Wikimedia

Crowdsource coding tasks.

1 Solution

Put this in your PHP.

$email = !empty($_GET["email"]) ? $_GET["email] : "";

Now, look for an input tag. It looks like this this input tag is going to be RIGHT under this text...
Username or E-mail:

It will probably look something like this

< input type="email" >< /input > Add this in value="< ?php $email ? >"
So it will look like this ">< /input >

wp-login.php is a wordpress file. I can't edit it. I would have to place something in some sort of wordpress hook -- if it exists on wp-login.php
tonloc over 3 years ago