- This topic is empty.
- AuthorPosts
-
December 17, 2013 at 7:24 am #10650
user3110084
ParticipantI have created a site in wordpress and in the flamingo theme there is no login page.
So i want to create a login page for the theme.
Can anyone suggest how to create custom login page in wordpress?
December 17, 2013 at 8:00 am #10652jogesh_pi
ParticipantFirst of all create a custom Login Form, to make it little bit easy create a custom template
Then you have to make a login form into your template.
Now use wp_signon() to make the user login, take a look on this example:$creds = array(); $creds['user_login'] = 'example'; $creds['user_password'] = 'plaintextpw'; $creds['remember'] = true; $user = wp_signon( $creds, false ); if ( is_wp_error($user) ) echo $user->get_error_message();
December 17, 2013 at 8:19 am #10651user3051901
Participantyou can use a login plugin or you can create a template where you can write all php code for login functionality.ex:
use wp_signon() function
or use $_REQUEST global variable and perform a select queryDecember 17, 2013 at 9:29 am #10653user2906688
ParticipantIf you want to customize the current wordpress login page (usually wp-login.php) you should take a look at WordPress Codex for Customizing the Login Form.
Or if you want to create a separate login page for your theme, I suggest you to use Theme My Login to do this.
This plugin themes the WordPress login, registration and forgot password pages according to your current theme. It creates a page to use in place of wp-login.php, using a page template from your theme. Also includes a widget for sidebar login.
Plugin Features
- Your registration, log in, and password recovery pages will all match the rest of your website
- Includes a customizable widget to login anywhere from your blog
- Redirect users upon log in and log out based upon their role
- Show gravatar to users who are logged in
- Assign custom links to users who are logged in based on their role
- Customize user emails for registration and/or password recovery
- Send user emails in HTML format
- Allow users to set their own password upon registration
- Require users to be approved or confirm e-mail address upon registration
- Theme user profiles
- AuthorPosts
- You must be logged in to reply to this topic.