0

I need to have a custom login url for a wordpress website that will use an headless theme to show a registration form.

I've tried using the login_url filter but the result isn't really what I was expected, I need to create a page in my wp dashboard and assign a page template where I call the default wordpress login form.

How I can correctly change the wp-admin and wp-login urls with a custom plugin that use actions or filters?

2
  • 1
    Note that you can add your own login form and make WP use that instead of the standard login form file via filters and redirects, or even ignore WP and send users to a bespoke login form while keeping the original intact, but you can't move the standard login form file wp-login.php. Likewise wp-admin is fixed and unmovable, you cannot change the folder name or move it or display at a different URL. You can change where the user goes when they log in though, what's the problem you're trying to solve that requires this specific solution?
    – Tom J Nowell
    Dec 7, 2022 at 15:57
  • @TomJNowell I want to use filters and redirects, but not sure what I need to use. At the moment I'm redirecting users after login if the role is customer or operator. Customer will see a custom vuejs app that load all profile informations, operators will have a custom page too and will accept or reject customers account after registration. Since customers Will start an SSO process from a magento ecommerce and my wp is the server, my idea is to avoid that operators enter wp-admin to login and have another url that will not tell them that are using WP
    – devdev
    Dec 7, 2022 at 16:04

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.