Pagina di registrazione front-end personalizzata
-
Salve,
nel mio tema ho già una pagina di registrazione front-end che ha questo codice:<?php if ( ! defined( 'ABSPATH' ) ) { exit; } ?> <?php if ( get_option( 'users_can_register' ) ) : ?> <form method="post" action="<?php the_permalink(); ?>" class="register-form"> <div class="form-group"> <label for="register-form-name"><?php echo __( 'Username', 'realia' ); ?></label> <input id="register-form-name" type="text" name="name" class="form-control" required="required"> </div><!-- /.form-group --> <div class="form-group"> <label for="register-form-email"><?php echo __( 'E-mail', 'realia' ); ?></label> <input id="register-form-email" type="email" name="email" class="form-control" required="required"> </div><!-- /.form-group --> <div class="form-group"> <label for="register-form-first-name"><?php echo __( 'First name', 'realia' ); ?></label> <input id="register-form-first-name" type="text" name="first_name" class="form-control"> </div><!-- /.form-group --> <div class="form-group"> <label for="register-form-last-name"><?php echo __( 'Last name', 'realia' ); ?></label> <input id="register-form-last-name" type="text" name="last_name" class="form-control"> </div><!-- /.form-group --> <div class="form-group"> <label for="register-form-phone"><?php echo __( 'Phone', 'realia' ); ?></label> <input id="register-form-phone" type="text" name="phone" class="form-control"> </div><!-- /.form-group --> <div class="form-group"> <label for="register-form-password"><?php echo __( 'Password', 'realia' ); ?></label> <input id="register-form-password" type="password" name="password" class="form-control" required="required"> </div><!-- /.form-group --> <div class="form-group"> <label for="register-form-retype"><?php echo __( 'Retype Password', 'realia' ); ?></label> <input id="register-form-retype" type="password" name="password_retype" class="form-control" required="required"> </div><!-- /.form-group --> <?php $terms = get_theme_mod( 'realia_submission_terms' ); ?> <?php if ( ! empty( $terms ) ) : ?> <div class="checkbox terms-conditions-input"> <input id="register-form-conditions" type="checkbox" name="agree_terms"> <label for="register-form-conditions"> <?php echo sprintf( __( 'I agree with <a href="%s">terms & conditions</a>', 'realia' ), get_permalink( $terms ) ); ?> </label> </div><!-- /.form-group --> <?php endif; ?> <button type="submit" class="button" name="register_form" onClick="passa_email_name()"><?php echo __( 'Sign Up', 'realia' ); ?></button> </form> <?php else: ?> <div class="alert alert-warning"> <?php echo __( 'Registrations are not allowed.', 'realia' ); ?> </div><!-- /.alert --> <?php endif; ?>
con il tema (e il plugin cmb2) sono stati creati due campi aggiuntivi tra i dati degli utenti registrati ma non so dove andare a cercare il nome di questi campi o dove siano registrati nel db.
Vorrei riuscire a:
1) se possibile eliminare la richiesta del nome utente ed utilizzare l’indirizzo di posta elettronica per entrambi i campi (nome utente, mail)
2) riuscire a passare due valori di default ai due campi aggiuntivi creati con cmb2Ho provato di tutto copiando qua e la dei codici (conosco qualcosa di html e quasi nulla di php) ma senza alcun risultato.
Grazie in aticipo
- Il topic ‘Pagina di registrazione front-end personalizzata’ è chiuso a nuove risposte.