-1

I want to make custom register page with some additional fields which will be shown later on users sent posts.

All I need is :

  1. Making manual register page

    Registration Items That I Need

    • Name
    • Family
    • User Name
    • Email
    • Password
    • Location
    • Radio button to chose type of user account with these elements (Seller - Buyer)
    • Able to send (ph no. - bbm pin - we chat code - website link - price - upload map)
    • Chose account type (Free - Premium )
  2. Give access to users to send post and upload photos (but not to be published before admin accept those).

Now what I'm confuse is how to do it! :-) I no have any idea how to start with that. Will be grateful if anyone can help me out with this form.

Thanks.

  • This seems a full project, not a question. Please show some code where you are stuck. Then someone may help you. – Nilambar May 7 '15 at 4:32
  • @Nilambar I updated my question. – Scott Wolter May 7 '15 at 10:04
0

UPDATE:

Call forms into front-end:

<?php
if (!is_user_logged_in()) {
 get_template_part('header', 'form');
} else {
    get_template_part('header', 'panel');
} ?>

header-form.php content:

<div class="alert alert-dismissible fade in" role="alert">
      <button type="button" class="close" data-dismiss="alert" aria-label="Close" data-toggle="tooltip" data-placement="top" title="Close"><span aria-hidden="true">&times;</span></button>


  <div role="tabpanel">

  <!-- Nav tabs -->
  <ul class="nav nav-tabs" role="tablist">
    <li role="presentation" class="active"><a href="#login" aria-controls="home" role="tab" data-toggle="tab"><i class="glyphicon glyphicon-log-in"></i> Login</a></li>
    <li role="presentation"><a href="#register" aria-controls="profile" role="tab" data-toggle="tab">Register</a></li>
    <li role="presentation"><a href="#password" aria-controls="messages" role="tab" data-toggle="tab">Lost Password?</a></li>
  </ul>

  <!-- Tab panes -->
  <div class="tab-content">

    <div role="tabpanel" class="tab-pane active" id="login">
        <h3><?php _e('Have an account?', 'landers'); ?></h3>
        <p><?php _e('Log in or sign up! It&rsquo;s fast &amp; <em>free!</em>', 'landers'); ?></p>

        <form class="form-horizontal" method="post" action="<?php bloginfo('url') ?>/wp-login.php">
                  <div class="form-group">
                    <input type="text" class="form-control" name="log" value="<?php echo esc_attr(stripslashes($user_login)); ?>" size="20" id="user_login" tabindex="11" placeholder="<?php _e('Username', 'landers'); ?>" />
                  </div>

                  <div class="form-group">
                   <label class="sr-only" for="user_pass"><?php _e('Password', 'landers'); ?>: </label>
                   <input type="password" class="form-control" name="pwd" value="" size="20" id="user_pass" tabindex="12" placeholder="Password" />
                  </div>


                 <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10">
                      <div class="checkbox">
                        <label>
                          <input type="checkbox"name="rememberme" value="forever" checked="checked" id="rememberme" tabindex="13" /> Remember me
                        </label>
                      </div>
                    </div>
                  </div>

                 <div class="form-group">
                      <?php do_action('login_form'); ?>
                      <input type="submit" class="btn btn-default" name="user-submit" value="<?php _e('Login', 'landers'); ?>" tabindex="14" class="user-submit" />
                        <input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>" />
                        <input type="hidden" name="user-cookie" value="1" />
                </div>
                </form>
    </div>

    <div role="tabpanel" class="tab-pane" id="register">
        <h3><?php _e('Register for this site!', 'landers'); ?></h3>
            <p><?php _e('Sign up now for the good stuff.', 'landers'); ?></p>
            <form method="post" action="<?php echo site_url('wp-login.php?action=register', 'login_post') ?>" class="wp-user-form">
                <div class="form-group">
                    <input class="form-control" type="text" name="user_login" value="<?php echo esc_attr(stripslashes($user_login)); ?>" size="20" id="user_login" tabindex="101" placeholder="<?php _e('Username', 'landers'); ?>" />
                </div>
                <div class="form-group">
                    <input class="form-control" type="text" name="user_email" value="<?php echo esc_attr(stripslashes($user_email)); ?>" size="25" id="user_email" tabindex="102" placeholder="<?php _e('Your Email', 'landers'); ?>" />
                </div>
                <div class="form-group">
                    <?php do_action('register_form'); ?>
                    <input class="btn btn-default" type="submit" name="user-submit" value="<?php _e('Sign up!', 'landers'); ?>" class="user-submit" tabindex="103" />
                    <?php $register = $_GET['register']; if($register == true) { echo '<p><?php _e("Check your email for the password!", "landers"); ?></p>'; } ?>
                    <input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>?register=true" />
                    <input type="hidden" name="user-cookie" value="1" />
                </div>
            </form>
    </div>


    <div role="tabpanel" class="tab-pane" id="password">
         <h3><?php _e('Lose something?', 'landers'); ?></h3>
         <span id="helpBlock" class="help-block"><?php _e('Enter your username or email to reset your password.', 'landers'); ?></span>
            <form method="post" action="<?php echo site_url('wp-login.php?action=lostpassword', 'login_post') ?>" class="wp-user-form">
                <div class="username">
                    <input type="text" class="form-control" placeholder="<?php _e('Username or Email', 'landers'); ?>" name="user_login" value="" size="20" id="user_login" tabindex="1001" />
                </div>
                <div class="login_fields">
                    <?php do_action('login_form', 'resetpass'); ?>
                    <input type="submit" name="user-submit" value="<?php _e('Reset my password', 'landers'); ?>" class="btn btn-primary user-submit" tabindex="1002" />
                    <?php $reset = $_GET['reset']; if($reset == true) { echo '<p><?php _e("A message will be sent to your email address.", "landers"); ?></p>'; } ?>
                    <input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>?reset=true" />
                    <input type="hidden" name="user-cookie" value="1" />
                </div>
            </form>
    </div>

  </div>

</div>


</div><!-- end alert-->

header-panel.php content:

<div class="alert alert-warning alert-dismissible fade in" role="alert">
      <button type="button" class="close" data-dismiss="alert" aria-label="Close"  data-toggle="tooltip" data-placement="top" title="Close"><span aria-hidden="true">&times;</span></button>


<div class="row">

        <div class="col-lg-6">

            <div class="row">

                <div class="col-md-6">
                    <h3><?php $current_user = wp_get_current_user(); echo '<i class="glyphicon glyphicon-user"></i> Welcome, ' . $current_user->user_login . "\n"; ?></h3>
                    <?php global $userdata; get_currentuserinfo(); echo get_avatar($userdata->ID, 60); ?>
                </div>

                <div class="col-md-6">
                    <p><i class="glyphicon glyphicon-log-in"></i> You&rsquo;re logged in as <strong><?php echo $current_user->display_name ?></strong></p>
                    <p>
                        <a class="btn btn-danger btn-sm" href="<?php echo wp_logout_url('index.php'); ?>"><i class="glyphicon glyphicon-log-out"></i> Log out</a>
                        <?php if (current_user_can('manage_options')) { 
                            echo '<a class="btn btn-info btn-sm" href="' . admin_url() . '"><i class="glyphicon glyphicon-dashboard"></i> ' . __('Admin') . '</a>';
echo '&shy;';
                            echo '<a class="btn btn-primary btn-sm" href="' . admin_url() . 'profile.php"><i class="glyphicon glyphicon-list"></i> ' . __('Profile') . '</a>';
    echo '&shy;';
                            echo '<a class="btn btn-success btn-sm" href="' . admin_url() . 'post-new.php"><i class="glyphicon glyphicon-pencil"></i> ' . __('Send Ad') . '</a>';
                            } else { 
                             } ?>

                    </p>
                </div>

            </div>

        </div>

        <div class="col-lg-6">
            <?php global $current_user;
                  get_currentuserinfo();
                    echo '<div class="table-responsive">';
                    echo '<table class="table table-bordered">';
                    echo '<tbody>';

                    echo '<tr>';             
                    echo '<td>';
                                  echo 'Username: ';
                                  echo '</td>';
                    echo '<td>';
                                  echo ''. $current_user->user_login . "\n";
                                  echo '</td>';
                    echo '</tr>';

                    echo '<tr>';             
                    echo '<td>';
                                  echo 'Your email: ';
                                  echo '</td>';
                    echo '<td>';
                                  echo '' . $current_user->user_email . "\n";
                                  echo '</td>';
                    echo '</tr>';

                    echo '<tr>';
                    echo '<td>';
                                  echo 'Your first name: ';
                                  echo '</td>';
                    echo '<td>';
                                  echo ''  . $current_user->user_firstname . "\n";
                                  echo '</td>';
                    echo '</tr>';

                    echo '<tr>';
                    echo '<td>';
                                  echo 'Your last name: ';
                                  echo '</td>';
                    echo '<td>';
                                  echo '' . $current_user->user_lastname . "\n";
                                  echo '</td>';
                    echo '</tr>';

                    echo '<tr>';
                    echo '<td>';
                                  echo 'Your display name: ';
                                  echo '</td>';
                    echo '<td>';
                                  echo '' . $current_user->display_name . "\n";
                                  echo '</td>';
                    echo '</tr>';

                    echo '<tr>';
                    echo '<td>';
                                  echo 'Your ID: ';
                                  echo '</td>';
                    echo '<td>';
                                  echo '' . $current_user->ID . "\n";
                                  echo '</td>';
                    echo '</tr>';

                    echo '</tbody>';
                    echo '</table>';
                    echo '</div>';
            ?>
        </div>

</div>

</div><!--end of alert-->

Till this much i've done. Now I need to add some fields into registration form and give access to publish post (on pending not become live before accept).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.