0
function go_away() {
    wp_die( 'Nice meeting you, byebye.' );
}
add_action( 'login_init' , 'go_away' );
add_action( 'admin_init' , 'go_away' );

hello i am using this code to lock admin of wordpress but i want that person can login in admin using a custom url he is adding.

For Eg:- first of all person is logging in using www.abc.com/wp-admin or www.abc.com/wp-login.php after lock he only know the url for login

url need to be something like this.

www.abc.com/my-admin or www.abc.com/restricted-area etc

Please help me friends

1

Please see this one https://wordpress.stackexchange.com/a/4799/64458 and before ask any question do some research first. And after that ask your question/prob with your working source/code.


Hey I already mention it that before ask anything please do some homework by your self. That will help you to improve.

here is your questions answer https://wordpress.stackexchange.com/a/78258/64458 , if you see this then you don't have to ask this one and neither you have to wait for some one that answer it for you.

  • HI i tried this code and with this code my admin part is restricted its fine. But if i want to login i have to remove this code i want a same wordpress login page to another url which i will set. – neil Sep 20 '16 at 7:10
  • I update my previous answer. – Mohammad Limon Sep 20 '16 at 16:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.