2019-07-05 | 2605 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-login
directory, 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.
Installation Guide:
hide-admin-bar-from-non-admins
directory 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/the the
directory or install the plugin through Plugins
in the administrationPlugins
in the administrationWith this plugin you can be very creative with its features, creating limited-time pages that expire, etc.
To customize your Wordpress login page is quite a tricky note because we are focusing on plugins, I will give you a quick walkthrough using a bit of redirect code and our already installed plugin.
Now, for instance, you have finished designing an awesome WordPress website for a client and you want to add a bit of professionalism to the task, all you have to do is to use the plugin "theme my login", which already will auto-create a login url, forgot password url, and a register url, if you click on the member "anyone can register" checkbox from the settings->General as explained above.
Then copy this code below into your theme function.php file via the editor console on your WordPress dashboard.
add_action('init','custom_login');
function custom_login(){
global $pagenow;
if( 'wp-login.php' == $pagenow ) {
wp_redirect('https://your website url.com/login/');
exit();
}
}
With this code anyone that visits the old wp-login.php url will be redirected to the new login page instantaneously, you can give this url a test https://petergurbani.com/wp-login.php to see it redirect to https://petergurbani.com/login This code can also be used to redirect WordPress custom login page to any other custom page you have on your website.
SEO Tips and Strategies For Small Businesses
Google is making a major change to Local Service Ads
Why is Google Ads So Expensive a Case Study
Meta Careers Remote Work From Home Jobs Scam
Strategies For Integrating Organic and Paid Web Site Traffic
How to use Google Analytics GA4 Reporting
Digital Marketing Agency Red Flags List
How To Grow Your Business Market Share Online
Different Types Of SEO Pricing Models
How To Improve Local SEO Search Results