Home › Forum › Problemi Vari con WP › Pagina protetta da password-inserimento form
-
AutorePost
-
-
2 Marzo 2013 alle 21:30 #23945dalelePartecipante
In una pagina protetta da password, vorrei inserire (visibile) un form per l’iscrizione, a seguito della quale ricevere la password di accesso.
Come posso fare?
Forse è possibile cambiare il testo iniziale della pagina protetta?
Grazie
-
2 Marzo 2013 alle 21:42 #101738elmaniseroPartecipante
Se quello che vorresti fare è creare una pagina riservata solo agli iscritti qui dentro trovi la risposta.
-
3 Marzo 2013 alle 15:40 #101748dalelePartecipante
Se quello che vorresti fare è creare una pagina riservata solo agli iscritti qui dentro trovi la risposta.
I plugin segnalati nel thread servono per gestire utenti registrati al blog, con diversi ruoli, in wordpress.
Io vorrei invece fornire una password per l’accesso alla sola pagina riservata, agli iscritti alla newsletter e per fare questo devo presentare il form di iscrizione nella pagina riservata, immagino al posto del testo di default.
-
3 Marzo 2013 alle 17:41 #101749elmaniseroPartecipante
Con questo codice inserito nel functions.php cambi la scritta della pagina protetta da password.
-
7 Marzo 2013 alle 17:42 #101857
-
7 Marzo 2013 alle 17:52 #101862elmaniseroPartecipante
Alla fine dopo questo ?>
-
7 Marzo 2013 alle 21:08 #101874dalelePartecipante
Alla fine dopo questo ?>
Grazie!!
-
9 Marzo 2013 alle 17:06 #101937dalelePartecipante
Alla fine dopo questo ?>
Grazie!!
ho provato, ma alla fine del file functions.php non c’è il carattere che mi hai indicato (?>)
Ho provato ad inserirlo da un’altra parte, ma non ha nessun effetto
-
9 Marzo 2013 alle 17:11 #101938elmaniseroPartecipante
ho provato, ma alla fine del file functions.php non c’è il carattere che mi hai indicato ?>
Se nel file functions.php del tuo tema non c’è quel simbolo alla fine, lo metti all’inizio prima di <?php
Che tema stai usando?
-
9 Marzo 2013 alle 21:48 #101950dalelePartecipante
ho provato, ma alla fine del file functions.php non c’è il carattere che mi hai indicato ?>
Se nel file functions.php del tuo tema non c’è quel simbolo alla fine, lo metti all’inizio prima di <?php
Che tema stai usando?
Niente da fare. Se modifico il functions.php poi non riesco a fare il login da wp-admin.
Il tema è Max Magazine.
Ho provato anche la soluzione (trovata qui sul forum) di modificare i file it.mo nella cartella languages…ma nulla di fatto.. mi legge soltanto l’inglese !
-
9 Marzo 2013 alle 22:12 #101951elmaniseroPartecipante
Allora nel tuo tema c’è un file che si chiama functions.php e finisci cosà¬
‘sort_order’ => ‘ASC’,
));
?>
<?php
}
?>
Subito qui sotto al simbolo che dicevi che non c’era, senza spazi e senza questa scritta, ci incolli il codice che ti avevo detto che è questo qui.
<?php
// Messaggio personalizzato nella pagina protetta da password
add_filter( ‘the_password_form’, ‘custom_password_form’ );
function custom_password_form() { global $post; $label = ‘pwbox-‘.( empty( $post->ID ) ? rand() : $post->ID ); $o = ‘<form class=”protected-post-form” action=”‘ . get_option(‘siteurl’) . ‘/wp-login.php?action=postpass” method=”post”>
‘ . __( “<h2>Inserisci la Password</h2>
<p>Questa pagina è protetta da password, per riceverla devi :</p>” ) . ‘
<label for=”‘ . $label . ‘”>’ . __( “Password:” ) . ‘ </label><input name=”post_password” id=”‘ . $label . ‘” type=”password” size=”20″ /><input type=”submit” class=”submit” name=”Submit” value=”‘ . esc_attr__( “Submit” ) . ‘” /> </form>
‘;
return $o;
}
?>
Ovviamente nella riga dove c’è scritto per Questa pagina è protetta da password, per riceverla devi : ci scrivi il messaggio che vuoi che appaia.
Ho provato con il tuo tema e funziona, non posso sapere dove sbagli, forse lasci degli spazi vuoti, forse usi un editor sbagliato…più di cosଠno so cosa dirti.
-
11 Marzo 2013 alle 21:25 #102012dalelePartecipante
Sembra che adesso funzioni (ho utilizzato direttamente l’editor di wordpress)
Grazie!!
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.