开发者

how to change the link in the wordpress email with newpassword?

how to change the link in the wordpress开发者_JAVA百科 email with newpassword? this information we get when we click on forgot password.

username : admin
password : admin
http://www.example.com/wp-login.php

here i want to change this url "http://www.example.com/wp-login.php" and set my own url... how can i do?

some reference code:

if ( !function_exists('is_user_logged_in') ) :function is_user_logged_in() {
$user = wp_get_current_user();


You can hook into the retrieve_password_message filter

function someFunction($message, $key){

}

add_filter('retrieve_password_message', 'someFunction');

You would then have to use the "someFunction" function to parse the $message variable and change the link.

The message variable contains the entire message. So you could simply trim the message based on the number of characters then tack on your new link...

HTH (Untested)


Using hooks would be my first thought so that you wouldn't have to edit any core files, however I have used the SB Welcome Email Editor plugin a couple times for this exact reason. Their are a couple plugins like this out their and they are fairly light weight and allow full customization of all Wordpress generated emails.


Try using a plugin such as Theme My Login, which does everything for you.

Editing core wordpress files is never a good idea, when updating wordpress, you'll loose all your work.


You can simply follow steps if you want to edit your code file.

Go to your wordpress folder. Look for the following files:

 1. /wp-login.php 
 2. /includes/functions.php

Change the all the codes which contains wp-login.php into your custom URL.

for example: admin.php or client-login.php

Now you can changed your login/signup URL into your custom URL.

Known issue: You can find some database error if you make any mistakes. Just refresh the page and try with the customized Url it will work...

Example site I used here : http://androideveloper.com/admin.php from http://androideveloper.com/wp-login.php

Cheers.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜