Home › Forum › Plugin e temi di WP › Excerpt – riassunti
-
AutorePost
-
-
19 Agosto 2012 alle 4:41 #22367mateSofiaPartecipante
Ciao.
Sto iniziando a creare un blog per me e i miei alunni. Questo l’indirizzo http://www.sofiasabatti.it/wordpress
La versione di WordPresss installata è la 3.4.1 e il tema è Twenty Eleven versione 1.4
Vorrei che le pagine che richiamano alcuni articoli (sia che siano gli archivi predefiniti sia che siano pagine con categoria da me creati) non visualizzassero subito tutti gli articoli per intero, ma ne visualizzassero solo il riassunto. Mi potete aiutare a non fare pasticci? Grazie
-
19 Agosto 2012 alle 5:00 #97129EmmePartecipante
Devi usare the_excerpt al posto di the_content. Dove dipende dal tema: loop.php, index.php, archive.php…
-
19 Agosto 2012 alle 5:39 #97131mateSofiaPartecipante
ok. faccio un po’ di prove. grazie
-
19 Agosto 2012 alle 5:54 #97132mateSofiaPartecipante
mmm…
In category.php ho questo:
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php
/* Include the Post-Format-specific template for the content.
* If you want to overload this in a child theme then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( ‘content’, get_post_format() );
?>
<?php endwhile; ?>
E ho provato a sostituitre the_post con the_excerpt, cosଠche la seconda riga diventa <?php while ( have_posts() ) : the_excerpt(); ?>
Qualcosa fa, nel senso che mi richiama il riassunto, ma è come se non si chiudesse il loop: richiama il riassunto ddello stesso articolo (l’ultimo pubblicato in quella categoria) innumerevoli volte (innumerevoli nel senso che non sono riuscita a ccontarle!)
Scusate l’ignoranza…
-
19 Agosto 2012 alle 6:11 #97133mschifanoPartecipante
Per gli articoli potresti usare l’opzione MORE che da un’anteprima dell’articolo ma non un riassunto, per le pagine, dal momento che quando selezioni la pagina la vuoi realmente vedere, non saprei…
-
19 Agosto 2012 alle 18:55 #97142mateSofiaPartecipante
Non ho ancora risolto.
the_excerpt funziona, nel senso che mi richiama il riassunto dell’articolo che ho creato, ma non va bene semplicemente sostituirlo al posto di the-post dove ho fatto io, per il motivo che ho detto prima. Spero che qualcun altro possa aiutarmi.
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.