Home › Forum › Problemi Vari con WP › Saltare il login
-
AutorePost
-
-
11 Novembre 2011 alle 14:07 #19719xdaniel2Partecipante
Salve a tutti,
volevo sapere se è possibile saltare la schermata classica di login, e fare l’accesso sulla home page di benvenuto?
In particolare io ho messo una area login sulla sidebar, ma non riesco a togliere il login base di wordpress.
Questo è il codice che ho inserito nella sidebar:
<?php
if (empty($_COOKIE[USER_COOKIE]) ){
?>
<form name="loginform" id="loginform" action="<?php bloginfo('siteurl'); ?>http://127.0.0.1:8887/wordpress/wp-login.php?loggedout=true" method="post">
<p align="left"><label>Username: <input type="text" name="log" id="log" value="" size="15" tabindex="1" /></label>
<p align="left"><label>Password: <input type="password" name="pwd" id="pwd" value="" size="15" tabindex="2" /></label>
<p align="left"><label><input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="3" />
Ricordami</label>
<p class="submit">
<input type="submit" name="submit" id="submit" value="Login »" tabindex="4" />
<input type="hidden" name="redirect_to" value="/wp-admin/" />
</form>
<?php
}
else {
?>
Ciao <?php echo wp_specialchars(stripslashes($user_login), 1); ?>
<p align="center">/wp-admin/">Accedi
<?php
}
?>
E come aspetto ci sono i form di user e pass ma quando inserisco i dati mi dice sempre "accesso negato o non sei autorizzato o il server non puo trovare il file".
Quindi credo che l'url del file wp-login sia sbagliato ma non so che altro mettere.
Ps: premotto che sto usando wordpress in locale per fini didattici! -
11 Novembre 2011 alle 14:09 #89709xdaniel2Partecipante
forse devo modificare anche il file wp-login.php per catturare i file del mio form sulla sidebar?
-
11 Novembre 2011 alle 14:18 #89710SteveAglAmministratore del forum
Sul repository dei plugin di WEP ci sono plugin che fanno mettere un form di login nella sidebar o dove si desidera nel front end.. studiane il codice per capire come fanno…
-
11 Novembre 2011 alle 14:27 #89711xdaniel2Partecipante
Ok grazie mille, ho pensato a un altra soluzione, e possibile agganciare un plugin al tasto di collegati della login di defaul ti wp??
Cioè anche lasciando la login invariata posso attraverso un plugin recuperare i dati di quella login per poi effettuare delle operazioni!
-
11 Novembre 2011 alle 14:35 #89712SteveAglAmministratore del forum
Veraemnte il form di login dell’admin è leggermente diverso
Poi il redirect to è pure sbagliato.. e mi son fermato qua.. perchè NON vada non lo so.. ma di certo le cose sbagliate con più di una… e non dipendonsolo da WP ma da logica di programmazione dire (vedi il redirect to)
-
11 Novembre 2011 alle 14:47 #89713xdaniel2Partecipante
Ok grazie mille !
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.