0

I don't want to use a plugin for this one and i would like to know how i can use a custom form for WP login. I made a form with bootstrap and i added the form action and two hidden fields but it doesn't work

 <form name="loginform" id="loginform" class="form-signin login_form" action="<?php echo esc_url( wp_login_url() ); ?>" method="post">
.......

<input type="hidden" name="redirect_to" value="http://localhost/mydomain.dev/_site/wp-admin/<?php //echo $_SERVER["REQUEST_URI"]; ?>" />
                        <input type="hidden" name="testcookie" value="1" />

Or should i let this go and alter wp-login.php with hook and filters???

Any tips?

2

1 Answer 1

3

As @Tomas Cot says, this page has everything you're looking for:

https://codex.wordpress.org/Customizing_the_Login_Form

Specifically, this section is what you're looking for:

Make a Custom Login Page

So far you've seen how to customize WordPress' built-in login page. You can also create your own custom login Page by using the wp_login_form function in one of your WordPress Theme's Page Templates:

<?php wp_login_form(); ?>

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.