简体   繁体   中英

Replace the /wp-admin with /dashboard inside custom theme functions.php in WordPress

Is there a way I can add a php script into my custom theme's file to have default Wordpress login page /wp-admin changed to /dashboard would there be a way to do this solely inside my themes functions.php file?

Someone told me that this needs to be done inside .htaccess file but thought there was a way around this, etc??

Thank-you.

Perhaps one of the answers here will work for you?

While your functions.php file can technically run whatever code you want it to, it's bad practice to include such functionality in a theme. I would recommend using an existing plugin or making your own.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM