Create Your Own WordPress Login Page

Admin Area

In Wordpress you can create your own users and user roles, you can even do this programmatically which means that you can create a register form so that visitors to your site can register to your site and login to a member's only area.

If you allow visitors to register as users of your site, they will have access to login to your admin area. This isn't too much of a problem if you set their roles to be able to do nothing in your admin area but this isn't very usable to your visitors.

It will be better if you can create a new login form, use the inbuilt Wordpress user manager and redirect successful logins to a different area other than the Wordpress admin area.

In this tutorial we are going to look at how you will create a new login form for users to be redirected to a different area.

Restrict Access To Admin Area To Only Admin Users
To start with we are going to restrict access to the Wordpress Admin Area to only users who we want to be there, in this situation I'm only going to allow admin users to access the admin area.

In your Wordpress theme functions.php file add the following code to block access to the admin area.

Upgrade to access all content on Paulund

Members unlock all tutorials and snippets

Access to all downloadable content

Access to code examples before others

Sign Up Now

Already a member? Login here

Subscribe To Newsletter

Get weekly updates to your email