Skip to content

Instantly share code, notes, and snippets.

@seferdemirci
seferdemirci / functions.php
Created February 26, 2022 14:19
This bunch of code is for to hide WordPress Login Page
<?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(){