This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add rewrite rule to use custom path for accessing the wp-login.php file | |
function redirect_custom_login(){ | |
add_rewrite_rule('custom-login', 'wp-login.php', 'top'); | |
} | |
add_action('init', 'redirect_custom_login'); | |
// Redirect if user come from 'custom-login' url | |
function redirect_to_home_page(){ |