How to create a registration form using TML?
There are several plugins you can use for WordPress registration. TML plugin allows you to create a custom registration and login form. It also has a custom redirection setting if you want to redirect users to a specific page when logging in. Install Theme My Login on your site. The plugin automatically creates the following pages upon activation.
- Login Page
- Logout Page
- Lost Password Page
- Register Page
- Reset Password Page
To allow users to register on the site, go to Dashboard > Settings > General. Scroll down to Membership and New User Default Role section and tick checkbox for Membership field to allow anyone to register and select WPCargo Client as default user role when user registers.
How to setup redirection when a user logs in?
Get the TML Redirection Extension. Go to Dashboard > Theme My Login > General and enable the custom redirection setting. The Redirection menu will then be available from the list of menu. Click the Redirection menu and find the WPCargo Client Role. Choose the custom location and paste the link of your Account Page. After doing so, click Save Changes at the bottom of the page.
If you don’t want to purchase the Redirection Extension, copy the following code in your child theme’s functions.php file.
add_filter( 'login_redirect', 'custom_login_redirect' ); function custom_login_redirect() { return home_url( 'my-account' ); }