WordPress Login Form Without Plugin

WordPress Login Form Without Plugin
115 Views

Are you need simple login form without plugin for your WordPress website? Yes, Then i have created [wc_login_form] shortcode with quick simple code. So you can put login form anywhere like in Pages, Posts and Widget etc… Therefore you just need to put [wc_login_form] shortcode where you need login form. So you need to follow below steps.

Code for shortcode.

You need to put below code in theme’s functions.php file. If you have created child theme then add this in function file of child theme.

Code for Login.

In this code i am validating form and log in WordPress on wp action. Add it in functions.php file after above code. If this code will not work then change action wp to init.

WordPress Default Login Form.

Provides a simple login form for use anywhere within WordPress. You can get login form using wp_login_form() function.

Was this article helpful?
YesNo

Leave a comment

Your email address will not be published.