Create a custom login page in WordPress


This tutorial will you how to set up a custom login page in WordPress. No special knowledge required for it.

To log into WordPress administration, it is convenient to go through one of two following URLs:

 

 

http://Yoursite.com/wp-admin/orhttp://Yoursite.com/wp-login. 

 

This method is however not very friendly if you allow the registration of new users. In fact, unless you know WordPress, you should enter the URL corresponding to each of the new registrants.

So the easiest thing to a login form and then it into a new page. We will therefore use page templates in WordPress .

 

Creating the page template

 

Using an FTP client, go to / wp-content/themes/Name_of_your_THEME / then duplicate the page.php file.

Rename the copy by an evocative title as template-login.php.

Open it and then convert it as a page template by adding lines of code at the beginning of file:

 

<? Php
/ *
Template Name: Login Area
* /
?>

 

Insert the login form

 

Then locate the line containing:

 

Php the_content

 

This line will display the contents entered in the TinyMCE editor from your WordPress administration.

 

Case 1 – Using a PHP command

 

Just above or below – is to your liking, place the following PHP command:

 

<? Php wp_login_form ();?>

 

Save the file to your FTP server and then connect to your WordPress administration. Changes in the module, click Add Item. This command has many parameters that can be added between parentheses as shown in the WordPress code page.


 

Case No. 2 – Use an form

 

This second method has the great advantage of not containing a single line of PHP code. So you can insert directly into a page, section or even a widget for WordPress.

The second advantage of hard-coding – instead of going through the arguments to insert in the PHP (which is not obvious when you start), it is much easier to customize. It is neither more nor less than a form can no longer be standard HTML.

 

<form method="post" action="http://www.YOUR_SITE.com/wp-login.php" id="loginform" name="loginform"><p><label for="user_login"> id </ label><input type="text" tabindex="10" size="20" value="" id="user_login" name="log"></ P><p><label for="user_pass"> Password </ label><input type="password" tabindex="20" size="20" value="" id="user_pass" name="pwd">

</ P>

<p> <label> <input type="checkbox" tabindex="90" value="forever" id="rememberme" name="rememberme">

Stay connected </ label>

| <a Href="http://www.YOUR_SITE.com/wp-login.php?action=lostpassword"> Forgot password </ a> </ p>

<p>

<input type="submit" tabindex="100" value="Se connecter" id="wp-submit" name="wp-submit">

<input type="hidden" value="http://www.YOUR_SITE.com/" name="redirect_to">

</ P>

</ Form>

 

Encompass the whole of a tag  with <div> , sprinkle with and get a result according to your needs. Do not forget to replace the URLs in the domain of your site.

Bravo! You now have a connection zone (login) personalized and easily repositioned on your site.

 

 

Signature


Incoming search terms:

inurl:_download php?resource_type=1,following inurl:/user-,create separate hidden page for log in wordpress,how to create a welcome login page in wordpress,how to setup a login page wordpress,insert wordpress login into page,wordpress special login area
0saves
If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.
About Abhishek

Abhishek Ghosh is an Orthopedic Surgeon, Inventor with 216 Patents, Current editor of The Customize Windows Media Group. You can follow and know more about Dr. +Abhishek Ghosh on Google Plus and follow on Twitter as @AbhishekCTRL.

Comments

  1. Solar Monster says:

    Just what I was looking for… there are way too many plugins all achieving the same thing but this is what I need. Thinking about it though I guess you found a lot of this code in the login.php file?

    Aaron

    • Yes, there are many plugins for customizing the logon page. If one code (or copy paste codes) it is better to avoid too many plugins.
      That is true :)

Trackbacks

  1. [...] is more professional and close to your brand. The topic is named “second method” ; because previously we described another similar method, which does not require the use of CSS file.  Therefore, this method can be exploited to create a login page absolutely looking like your [...]

Speak Your Mind

*