2019-07-05 | 114 Print PDF
If you have been searching for how to create a login page for your Wordpress website with a user custom landing page or dashboard then this post might just be what you need to get your website up and running. Follow the steps illustrated in this post and get for yourself a pleasant website that has login, registration, page restriction and client-side dashboard.
Please note: All illustration here is being executed via plugins that are light weighted.
After designing a website swiftly with WordPress, the next hurdle will be how to create a login page. To do this in the easiest way will be to utilize a simple plugin that reduces all the code hustle. From my experience using the WordPress plugin Theme my Plugin
/wp-content/plugins/theme-my-logindirectory, or install the plugin through the WordPress plugins screen directly.
The other fact why I recommend this is that it automatically creates all these login/signup/reset password pages using your theme design.
PS: Do note that you need to visit Settings==>General==>and check the "Any One Can Register" beside Membership and also set the New User Default Role to "Subscribers".
Ok so we are done with the login, logout, forgot password and registration page creation without writing any WordPress code. Next thing we need to do is to find how to create a page which our website users after login will be redirected to, we have a custom page, post and page types that are categorized under page creation for WordPress.
Just as we used a preferred plugin for the login page we can also assign a plugin for the redirect to a landing page after login. From research, I can only attest to one plugin on WordPress that can actually fulfill this with no PRO request features, and Peter’s Login Redirect is the most suitable for this.
Peter's Login Redirect allows you to define a set of redirect rules for specific users, users with specific roles, users with specific capabilities, and a blanket rule for all other users. Also, set a redirect URL for post-registration. This is all managed in Settings > Login/logout redirects. Furthermore, the features of this plugin are simply in its title.
Unzip wplogin_redirect.php to your WordPress plugins folder.
Redirect rules are configured in the Settings > Login/logout redirects admin menu.
We have been able to have a login redirect to redirect after login to our custom page, but we have two issues at hand, how to secure the page from users that are not logged in, and how to remove the admin bar from user dashboard, as you can see in the image above.
This will involve installing two plugins to hide or remove the client side WordPress dashboard header
To achieve the desired results, you will need to install the following two plugins:
This plugin doesn’t have any settings that need to be changed. It will hide the admin bar from the frontend of WordPress for all user’s except administrators. This does not restrict access to the WordPress dashboard, that’s where the Remove Dashboard Access plugin comes into play.
hide-admin-bar-from-non-adminsdirectory to the
/wp-content/plugins/directory of your site.
The Hide Admin Bar from Non-Admins still works with WordPress 5.0+
The Remove Dashboard Access plugin is fairly easy to set up as it has options that make sense.
After installing the plugin, you should have a menu item under Settings > Dashboard Access.
Once you’ve navigated to the settings page for the Remove Dashboard Access plugin, this is where we will configure how to handle non-admins.
How To Restrict Users From Logged in Pages
Lastly, we need to place restrictions on the dashboard or custom page we have assigned as the landing page from the login form, and to do this we made use of another WordPress plugin called Restrict User Access – Membership Plugin with Force with this plugin
Restrict content and contexts to control what your users get exclusive access to or drip content over time. Create an unlimited number of Access Levels and override user and role capabilities.
Use this plugin to quickly set up a membership site where your users can get different levels such as Gold, Silver, and Bronze. Then, restrict access to e.g. posts tagged “Premium”, articles written by specific authors, or all your free products.
No coding required.
/wp-content/plugins/thedirectory or install the plugin through
Pluginsin the administration
Pluginsin the administration
With this plugin you can be very creative with its features, creating limited time pages that expire, etc.