-
-
Save KaineLabs/577d094c67e585729da12cdddde9ffb8 to your computer and use it in GitHub Desktop.
<?php | |
/** | |
* Redirect "wp-login.php" Page To Youzer Login Page. | |
*/ | |
function yz_redirect_wplogin_to_youzer_login_page() { | |
if ( isset( $_GET['action'] ) && ( $_GET['action'] == 'logout' || $_GET['action'] == 'lostpassword' || $_GET['action'] == 'rp' || $_GET['action'] == 'bp-resend-activation' ) ) { | |
return; | |
} | |
global $pagenow; | |
if ( 'wp-login.php' == $pagenow && $_SERVER['REQUEST_METHOD'] == 'GET' ) { | |
// Get Login Page Url. | |
$login_url = 'add-your-custom-login-page-url-here'; | |
// Redirect !! | |
wp_redirect( $login_url ); | |
exit(); | |
} | |
} | |
add_action( 'init', 'yz_redirect_wplogin_to_youzer_login_page' ); |
Sir, I add this code on the "bp-custom.php" file but this code is not work. Please help.....
Screenshoot:
https://prnt.sc/su5bbh
http://prnt.sc/su5bh8
Hi,
Sir, how will I add this code to my website?You can add it to the file "bp-custom.php" in the path "wp-content/plugins".
Ps: if you didn't find the file "bp-custom.php", just create a new one.
Hello Sir, Sir, I add this code on the "bp-custom.php" file but this code is not work. Please help.....
Screenshoot:
https://prnt.sc/su5bbh
http://prnt.sc/su5bh8
Please Help....
Hello, Sir, I add this code on the "bp-custom.php" file but this code is not work. Please help..... Screenshoot: https://prnt.sc/su5bbh http://prnt.sc/su5bh8 Please Help....
…
On Fri, Jun 5, 2020, 6:32 AM KaineLabs @.***> wrote: @KaineLabs commented on this gist. ------------------------------ Hi, Sir, how will I add this code to my website? You can add it to the file "bp-custom.php" in the path "wp-content/plugins". Ps: if you didn't find the file "bp-custom.php", just create a new one.— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://gist.github.com/577d094c67e585729da12cdddde9ffb8#gistcomment-3330381, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL57ZMAU73KDPYWKQHHTWTTRVBDLBANCNFSM4NSV2E2A .
Hello,
Sorry for the delay i'm not active here on github, i came here only when i want to add new snippets.
Please consider using our support forum kainelabs.ticksy.com and our support team will help you :)
Stay safe.
Best Regards, Youssef
Hi,
Sir, i have create a new one "bp-custom.php" in the path "wp-content/plugins" and add this code. But does not redirect the URL "https://offermom.com/wp-login.php" to https://offermom.com/login/
Screenshoot: http://prnt.sc/sx6lvt
You can add it to the file "bp-custom.php" in the path "wp-content/plugins".
Ps: if you didn't find the file "bp-custom.php", just create a new one.