WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] I want to Replace the default WP register & login with my own custom forms (13 posts)

  1. napster2001
    Member
    Posted 1 year ago #

    I'm new to WordPress & php, but have managed to create my own custom signup & sign in form, (http://fixmyblog.cu.cc/custom-signup) that I'll like to use instead of the wordpress one, (http://fixmyblog.cu.cc/wp-login.php?action=register) but connecting & getting it functional is my headache, I want the signup process to to be done on my custom page, rather than a standalone wordpress default sign up page.
    please can anyone help me with the setup, have read tons of tutorials but I don't seem to get it working.

  2. deepbevel
    Member
    Posted 1 year ago #

    Not sure what you've pursued but I'd start here.

  3. kmessinger
    Volunteer Moderator
    Posted 1 year ago #

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

  4. napster2001
    Member
    Posted 1 year ago #

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

  5. napster2001
    Member
    Posted 1 year ago #

    @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

  6. deepbevel
    Member
    Posted 1 year ago #

    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.

  7. napster2001
    Member
    Posted 1 year ago #

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

  8. napster2001
    Member
    Posted 1 year ago #

    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 {
    ?>
  9. deepbevel
    Member
    Posted 1 year ago #

  10. napster2001
    Member
    Posted 1 year ago #

    alright checking it up thanks so much

  11. napster2001
    Member
    Posted 1 year ago #

    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 :)

  12. deepbevel
    Member
    Posted 1 year ago #

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

  13. napster2001
    Member
    Posted 1 year ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic