Home › Forum › Problemi Vari con WP › Aggiungere Funzione dopo il More all’interno della pagina singola
-
AutorePost
-
-
12 Febbraio 2009 alle 23:22 #9460RedemptionPartecipante
Il mio problema è che devo aggiungere due righe di codice che devono partire solo se un utente entra in un articolo singolo dove viene utilizzato il more.
esempio
_________________
Titolo
contenuto
more
funzione
fine contenuto
___________________
c’è un modo per fare questo modificando qualche file del core di wp o eventualmente tramite l’utilizzo di un plugin ?
Grazie
-
13 Febbraio 2009 alle 7:31 #62646SteveAglAmministratore del forum
Nei file del tema se hai un file single.php è li che devi andare ad inserire il tuo codice dopo the_content, altrimenti sarà in index.pp, studia la dissezione di un tema WP sul nostro wiki per capire cosa copone e come è fatto un tema e se il caso è il secondo anche i parametri condizionali cercando is_single sul nostro wiki
-
13 Febbraio 2009 alle 8:44 #62650RedemptionPartecipante
Grazie per la tempistiva risposta SteveAgl, il fatto è che se emetto il codice dopo il the_content la funzione viene attivata in home e non all’interno dell’articolo come vorrei…
-
13 Febbraio 2009 alle 8:56 #62651SteveAglAmministratore del forum
Se il codice lo inserisci tu manualmente in ogni articolo:
http://wordpress.org/extend/plugins/hana-code-insert/
Altrimenti se deve inserirlo automaticamente… non esiste nulla occorrerebbe scrivere un plugin che ove sia presente il more (quindi dove c’è the_excertp e non the_content) mette del codice predefinitio… ma è una cosa da fare da zero.
-
13 Febbraio 2009 alle 12:32 #62667RedemptionPartecipante
Si, hai colto il punto, dovrebbe farlo automaticamente. Quindi non si può modificare manualmente da qualche parte? Devo crearlo da 0 ?
-
13 Febbraio 2009 alle 13:27 #62669SteveAglAmministratore del forum
Esatto, non o ami letto di un plugin che faccia quel che chiedi… inoltre non capisco come un articolo con il more, se presente mostri contenuto dopo… se c’è il more non c’è il seguito e viceversa… il more NON appare negli articoli singoli. In ogni caso si occorre scrivere un plugin ad hoc
-
14 Febbraio 2009 alle 9:47 #62712RedemptionPartecipante
Negli articoli singoli il more c’è anche se non si vede… è un commento html, ecc o io voglio che dopo quel commento parta il mio codice… cmq grazie, a questo punto mi rimbocco le maniche
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.