Using Gutenberg Blocks #
- Go to admin Dashboard > Pages > All Pages.
- Create a new page or edit an existing page.
- On the page editor, click on the + button on the top-left.
- Click on the Login Form block to add it to your page.
Login Form Settings #
Once you have added the Login Form block to your site, you can set certain attributes for the Login Form from the block settings. These attributes are:
- Redirect URL: Enter a URL where you want to redirect the users after they log in to your site.
- Logout URL: If you want to show the logout button on this page, enter the logout URL here.
- User State: This will view the block in either the logged-in or logged-out state as per your selection.
Using the Login Form shortcode #
If you only want to use the login form of the User Registration, you can use the following shortcode on your page/posts.
[user_registration_login]
Wanna know how to redirect users after login?
The [user_registration_login] and [user_registration_my_account] shortcode can both be used to show login form. However, the My Account page shortcode will also give a Profile dashboard for the users. If you use the [user_registration_login] shortcode, only the login form will be available.
You can redirect users to specific page after they login. For this, visit this link.