Home › Forum › Problemi Vari con WP › Creare estratti dagli articoli di varia lunghezza
-
AutorePost
-
-
25 Settembre 2008 alle 8:40 #7991TremisferoPartecipante
SAlve a tutti, sto cercando un plugin (o un modo) per riuscire ad avere degli exerpt di varia lunghezza e magari poterlo scegliere nel tag al momento del richiamo.
the_exerpt(numero caratteri)
o qualcosa del genere.
Esiste o devo modificare, come ho fatto in passato, la funzione the_exerpt e farmene altre di varie lunghezze?
-
25 Settembre 2008 alle 8:53 #58113Q-designPartecipante
credo potresti usare questo plugin, che ti permette di scegliere cosa mostrare e aggiunge un box per l’excerpt: http://www.laptoptips.ca/projects/wordpress-excerpt-editor/
-
26 Settembre 2008 alle 8:20 #58129TremisferoPartecipante
mmm non fa al caso mio. Io non ho bisogno di creare riassunti scritti. Voglio dei risassunti automatici che prendano i primi caratteri dell’articolo Ma vorrei la possibilità di scegliere quanti caratteri visualizzare e quindi ottenere riassunti della lunghezza che voglio su uno stesso articolo. Perchè a seconda di dove lo visualizzo nel layout ho bisogno che sia più o meno lungo.
-
26 Settembre 2008 alle 8:24 #58130wollyAmministratore del forum
usa il tag more.
-
26 Settembre 2008 alle 8:29 #58131TremisferoPartecipante
Non posso, perchè altrimenti non ottengo quel che voglio. Voglio poter decidere quanti caratteri visualizzare di uno stesso articolo, in forma di excerpt.
Qualcosa del tipo:
ARTICOLO
Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
<?php the_excerpt(‘Continua’ ‘words=20’); ?>
Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim …
<?php the_excerpt(‘Continua’ ‘words=10’); ?>
Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod…
-
26 Settembre 2008 alle 8:51 #58132wollyAmministratore del forum
allora devi probabilmente scriverti un plugin o provare a modificare il plugin the excerpt reloaded.
-
26 Settembre 2008 alle 9:55 #58138TremisferoPartecipante
niente.. allora , come al solito, mi dovrò duplicare la funzione the_excerpt modificandola.
Grazie per gli aiuti!
-
26 Settembre 2008 alle 11:41 #58140SteveAglAmministratore del forum
Direi che questo è la soluzione:
-
26 Settembre 2008 alle 15:30 #58148TremisferoPartecipante
Cavolo ma hai prorpio ragione. Questo plugin lo usavo ma non mi ero accorto che si potessero definire dei parametrinel tag che richiama l’excerpt.
-
26 Settembre 2008 alle 15:55 #58149TremisferoPartecipante
Ma non riesco a capire come devo richiamare la funzione che crea il riassunto personalizzato inline.
Sul txt dice di usare questa stringa:
<
$advancedexcerpt->filter($text, $length, $use_words, $ellipsis, $allowed_tags)`
ma come devo fargliela tirare fuori?
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.