Home › Forum › Plugin e temi di WP › Articoli con password ma commenti visibili
-
AutorePost
-
-
22 Novembre 2009 alle 16:57 #12255ottomasiPartecipante
Come faccio a lasciare che tutti possano leggere i commenti degli articoli con password? Esempio di pagina in cui vorrei che fossero visibili a tutti i commenti
Ho cercato un bel po’ sul forum e in rete ma non ho trovato nulla. Andando a leggermi il codice mi pare di capire che dovrei intervenire sul “core” di wp e la cosa sarebbe un po’ lunga e complicata… voi avete un idea?
Grazie
Stefano
Memosystem
-
22 Novembre 2009 alle 22:03 #69727GREYFOXPartecipante
nell branch true dell’if in cui c’è questo controllo “post_password_required()” potresti inserire il ciclo che scorre i commenti in questo modo verrebbero visualizzati anche quando l’articolo è protetto da password…. almeno credo… non ho provato. La mia è solo una supposizione. Naturalmente il tutto prima del return.
-
23 Novembre 2009 alle 11:14 #69759ottomasiPartecipante
Quindi dici di mettere le mani sul codice “core” di wp? E’ una cosa sicura? Cioè modificando quello non rischio di rompere dell’altro? Il codice di wp lo conosco poco e nulla purtroppo…
-
23 Novembre 2009 alle 11:18 #69760GREYFOXPartecipante
no no scusami… ho dimenticato di dirti in quale file sta il controllo *___*
Intendevo in comments.php, un file del tuo tema…. cosi non modifichi il core ma ogni volta che cambi tema devi effettuare questa modifica.
-
23 Novembre 2009 alle 11:55 #69764ottomasiPartecipante
Grazie!
ho cancellato questo`
if ( post_password_required() ) { ?>
<p class="nocomments"><?php _e('This post is password protected. Enter the password to view comments.', 'corso-memoria'); ?></p>
<?php
return;
}
Ma ho commentato anche questo
/*if ( post_password_required() ) {
echo __('..Enter your password to view comments');
return;
}*/
da comment-template.php sotto la cartella wp-includes. Continuava a visualizzarmi l'avviso altrimenti... non dovrebbe fare danni... giusto?
-
23 Novembre 2009 alle 12:12 #69767GREYFOXPartecipante
no io ti avevo suggerito di modificare file del tuo tema… non quelli del core. Cosi però a me sembra che hai solo eliminato la richiesta della password.
-
23 Novembre 2009 alle 14:00 #69773ottomasiPartecipante
Restava la stringa di richiesta di inserimento della password se non toglievo… in ogni caso il comando echo non fa altro che rimandare a video il testo passato come parametro… no?
-
23 Novembre 2009 alle 14:34 #69776GREYFOXPartecipante
e perche non dovrebbe rimanere? a meno che nn vuoi rendere visibile la richiesta della password… comunque modifica quelli del tema non questi.
-
23 Novembre 2009 alle 14:40 #69778ottomasiPartecipante
Se scrivo “Enter your password to view comments” e i commenti sono già visibili è un po’ ridondante no? Sul tema non saprei come fare…
-
23 Novembre 2009 alle 14:44 #69783ottomasiPartecipante
L’ho ripensata… ho modificato il .po cancellando la traduzione, neanche questa è pulitissima ma già meglio
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.