Home › Forum › Problemi Vari con WP › Homepage con prime righe post
-
AutorePost
-
-
25 Dicembre 2010 alle 21:21 #16154mariellaPartecipante
Buonasera e auguri!
Non riesco a configurare WP in modo da visualizzare, come homepage, solamente le prime righe degli ultimi post, con l’opzione eventuale, per chi volesse, “continua a leggere”.
Al momento, infatti, si vedono i vari post per esteso e, siccome alcuni sono anche lunghi, non è proprio ottimale!
Su “impostazioni” – “lettura” ho indicato:
“Visualizzazione pagina iniziale Gli ultimi articoli”
“Le pagine del blog visualizzano al massimo 10 articoli più recenti”
“I feed visualizzano 10 elementi”
“Per ciascun articolo in un feed, mostra: Riassunto”
“Codifica delle pagine e dei feed UTF-8”
Qualcuno sa aiutarmi?
Grazie e ancora tanti auguri
-
25 Dicembre 2010 alle 21:50 #79866je92Partecipante
nel file index.php del tuo tema devi sostituire la funzione the_content con the_excerpt
-
25 Dicembre 2010 alle 21:59 #79867mariellaPartecipante
Grazie je92.
Ma non capisco dove.
Ti riporto di seguito il file index.php contenuto nella cartella wp-content/themes/twentyten (il tema che uso):
<?php
/**
* The main template file.
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
* Learn more: http://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/
get_header(); ?>
<div id=”container”>
<div id=”content” role=”main”>
<?php
/* Run the loop to output the posts.
* If you want to overload this in a child theme then include a file
* called loop-index.php and that will be used instead.
*/
get_template_part( ‘loop’, ‘index’ );
?>
</div><!– #content –>
</div><!– #container –>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Grazie per l’aiuto
-
26 Dicembre 2010 alle 10:27 #79868je92Partecipante
</div><!– #content –>
prova a sostituirla con
</div><!– #excerpt–>
se vuoi mostrare nell’anteprima anche un’immagine devi utilizzare un plugin come Hungred Post Thumbnail
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.