WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] I want to Replace the default WP register & login with my own custom forms

[Resolved] I want to Replace the default WP register & login with my own custom forms

Viewing 12 replies - 1 through 12 (of 12 total)
  • Not sure what you’ve pursued but I’d start here.

    Moderator kmessinger

    @kmessinger

    There are some plugins for that. You can do a google search and check here. http://wordpress.org/extend/plugins/

    Thanks Kmessinger,but I don’t want to use plugins

    @deepbevel, please I’ve seen the page you directed me to, but I don’t know how & where to input those codes,I know few basics in html, not good with advanced codes though

    I’m sure that’s why kmessinger recommended the plugin route.
    I haven’t done what you want to do, but the codex makes some sence to me. It looks like you might start by adding the function to your theme and add your custom form id in this part

    'form_id' => 'loginform-custom',

    then use the given template tag in your login page template.

    alright thanks deepbeve, will try it out & update you on the result

    Hi deepbevel please I’ve been able to work on the form but keeps seeing error

    Parse error: syntax error, unexpected T_STRING, expecting ‘,’ or ‘;’ in /home/haastrup/public_html/fixmyblog.cu.cc/wp-content/themes/PebblesAndWood/custom_login/custom-login.php on line 25
    when I visit the page http://fixmyblog.cu.cc/custom-login/

    This is the FULL code

    [ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]

    <?php
    /*
    Template Name: Custom WordPress Login
    */
    global $user_ID;  
    
    if (!$user_ID) {  
    
    if($_POST){
    //We shall SQL escape all inputs
    $username = $wpdb->escape($_REQUEST['username']);
    $password = $wpdb->escape($_REQUEST['password']);
    $remember = $wpdb->escape($_REQUEST['rememberme']);  
    
    if($remember) $remember = "true";
    else $remember = "false";
    $login_data = array();
    $login_data['user_login'] = $username;
    $login_data['user_password'] = $password;
    $login_data['remember'] = $remember;
    $user_verify = wp_signon( $login_data, true );   
    
    if ( is_wp_error($user_verify) )
    {
       echo ("<span class='error'>Invalid username or password. Please try again!</span>");
       exit();
     } else
     {
       echo ("<script type='text/javascript'>window.location='". get_bloginfo('http://fixmyblog.cu.cc/custom-login') ."'</script>");
       exit();
     }
    } else {   
    
    get_header();  
    
    ?>
    <div id="container">
    <div id="content">  
    
    <!--?php the_title(); ?-->  
    
     <link href="fixmyblog.cu.cc/v50_css/style9579.css" media="screen" rel="stylesheet" type="text/css" />
    <!--[if lt IE 8]>
    <link href="fixmyblog.cu.cc/v50_css/style9579.css" media="screen" rel="stylesheet" type="text/css" />
    <![endif]-->
    <h3>Member Sign In</h3>
    
    <div id="result"></div> <!-- To hold validation results -->
    <form action="http://fixmyblog.cu.cc/custom-login" method="post" class="form">
    					<input type="hidden" name="url" value="">
    					<input type="hidden" name="action" value="login">
    <fieldset>
    					<legend>The field with * is required.</legend>
    					<div class="space_20h"></div>
    
    <p>
    					<label>Username <em>*</em><small>Letters and numbers only</small></label><input type="text" name="username" required="required" value="" class="input_index"/>
    
    					<label>Password <em>*</em><small></small></label><input type="password" name="password" required="required" class="input_index"/>
    
    					<label> </label>
    					<div class="custom" style="width:350px">
    					<input id="remember" name="remember" type="checkbox" class="radiobox" value="1"> Remember me on this computer
    					</div>
    
    					  <div class="action">
    						<button class="button button-blue" type="submit"><span class="accept"></span>Sign In</button>
    
    						<a href=""><b>Create a new account</b></a>
    						<a href="">Forgot password? Click here.</a>
    
    </div>
    </fieldset>
    </form>
    
    <!--?php  
    
    get_footer();
        }
    }
    else {
         echo ("<script type='text/javascript'>window.location='". get_bloginfo('http://fixmyblog.cu.cc/custom-login') ."'</script>");
       exit();
     }
    } else {
    ?>

    alright checking it up thanks so much

    Hi guys thanks for all the contribution,@ Deepbevel I’d checked on the link you gave me its great, I’ve even done all they said but still have some errors showing, but I’ve got very thing I’m looking for after making some searches on google, so I don’t need to do all that coding again. The theme my login Plugin is the best solution, worked like charm Theme my Login is the exact stuff I’m looking for. @kmessinger like you said a its a plugin that did the magic 🙂

    glad you found your solution. I’ll keep it in mind.

    yeah it sure did the magic 🙂 will recommend to anyone who want to tweak or change the default WP login forms and have itas a Frontend Login for users,.It took less than 2min to setup & get what I’d spent soo long working on. Great Plugin!! & Once again thank you guys for coming to my aid

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘[Resolved] I want to Replace the default WP register & login with my own custom forms’ is closed to new replies.
Skip to toolbar