Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
Coppa WPB
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

Come visualizzare i riassunti degli articoli nei temi di WordPress

Nota editoriale: guadagniamo una commissione dai link dei partner su WPBeginner. Le commissioni non influenzano le opinioni o le valutazioni dei nostri redattori. Per saperne di più su Processo editoriale.

Volete imparare a visualizzare i riassunti degli articoli nel vostro tema WordPress?

Mostrando sul vostro blog dei riassunti degli articoli invece che l’intero, potete aiutare i visitatori a trovare rapidamente i contenuti interessanti e a ridurre i tempi di caricamento del sito.

In questo articolo vi mostreremo come aggiungere facilmente i riassunti degli articoli al vostro tema WordPress.

How to display post excerpts in WordPress themes

Perché visualizzare i riassunti degli articoli in WordPress?

Di default, WordPress mostra gli articoli completi sulla homepage, sulla pagina del blog e sulle pagine dell’archivio del sito web. Tuttavia, questa non è la migliore esperienza per gli utenti che vogliono sfogliare rapidamente i diversi articoli e trovare quello che vogliono leggere per primo.

Può anche significare un sacco di scorrimento, un problema enorme per gli utenti di smartphone e tablet.

Quando si pubblicano più articoli, WordPress può anche dividere i blog su più pagine utilizzando la paginazione. Quando gli articoli meno recenti vengono spostati su altre pagine, spesso ricevono meno visualizzazioni e meno coinvolgimento.

Per questo motivo, molti proprietari di blog mostrano invece i riassunti degli articoli sulle pagine dell’archivio e dell’indice del blog. Poiché viene caricata solo una parte di ogni articolo, questo può aumentare la velocità e le prestazioni di WordPress.

An example of post excerpts in a WordPress theme

WordPress ha un supporto integrato per i riassunti degli articoli, ma non tutti i temi utilizzano questa caratteristica.

Detto questo, vi mostriamo come visualizzare i riassunti degli articoli in qualsiasi tema di WordPress.

Come verificare se il tema di WordPress supporta i riassunti degli articoli

La maggior parte dei temi WordPress più diffusi ha un’impostazione che permette di mostrare i riassunti degli articoli invece dell’intero post.

Per verificare se il tema supporta i riassunti degli articoli, visitare la pagina Aspetto ” Personalizza nella dashboard di WordPress.

La posizione di queste impostazioni varia a seconda del tema di WordPress, ma è necessario cercare le impostazioni etichettate come “Blog”.

Adding post excerpts to a WordPress theme using the Customizer

Ad esempio, se si utilizza il tema WordPress Astra, è necessario selezionare “Blog” e poi fare clic su “Blog/Archivio”.

È quindi possibile scorrere giù fino alla sezione “Elementi dell’articolo” ed espandere la scheda “Riassunto”. Una volta fatto ciò, selezionate l’opzione “Estratto”.

Adding post excerpts to your WordPress website

Se il tema ha un’opzione “Impostazioni del tema” o “Impostazioni generali del post”, è possibile abilitare i riassunti degli articoli in queste sezioni.

Una volta fatto ciò, è sufficiente fare clic sul pulsante “Pubblica”. Ora, visitando il blog, l’archivio o la homepage, si dovrebbe vedere un elenco di riassunti del blog anziché gli articoli completi.

Se il tema non dispone di un supporto integrato per i riassunti degli articoli, è necessario aggiungerlo. È sufficiente utilizzare i collegamenti rapidi qui sotto per passare al metodo che si desidera utilizzare:

Metodo 1: Aggiungere i riassunti degli articoli a WordPress usando il codice (facile)

Se il tema di WordPress non supporta i riassunti degli articoli in modo predefinito, è sempre possibile aggiungere questa caratteristica manualmente.

È possibile modificare direttamente i file del tema di WordPress, ma consigliamo di creare un tema child. In questo modo, quando aggiornerete il tema di WordPress, non perderete le modifiche apportate.

Per maggiori dettagli, consultate la nostra guida per principianti su come creare un tema child di WordPress.

Dopo aver fatto questo, è necessario trovare il template che controlla ogni pagina in cui si desidera mostrare i riassunti degli articoli. Per la maggior parte dei temi, si tratta di home.php, content.php, categoria.php e archivia.php.

Per trovare il file giusto, consultate la nostra guida per principianti sulla gerarchia dei template di WordPress.

Una volta fatto ciò, è sufficiente individuare il codice seguente in ogni file:

<?php the_content(); ?>

Quindi, sostituire questo codice con la tagga_excerpt:

<?php the_excerpt(); ?>

A questo punto, salvare il file e selezionare il sito web. Ora si dovrebbero vedere dei riassunti dell’articolo al posto dell’articolo completo.

Modificare la lunghezza predefinita dei riassunti di WordPress

Di default, WordPress mostra le prime 55 parole di ogni articolo e poi aggiunge un’ellissi (…) per indicare che ci sono altri contenuti.

È possibile modificare la visualizzazione di più o meno parole aggiungendo del codice al sito web WordPress. È possibile modificare direttamente i file del tema, ma può essere complicato.

Un semplice errore può anche causare molti errori comuni di WordPress e può persino rompere completamente il vostro sito.

Per questo motivo, consigliamo di utilizzare WPCode. Consente di aggiungere facilmente snippet di codice in WordPress senza dover modificare i file del tema. In questo modo, è possibile aggiornare o modificare il tema senza perdere il codice personalizzato.

Per prima cosa, è necessario installare e attivare il plugin gratuito WPCode. Per maggiori informazioni, potete consultare la nostra guida per principianti su come installare un plugin di WordPress.

Dopo l’attivazione, visitate la pagina Code Snippets ” + Add Snippet dalla Bacheca di WordPress e fate clic sul pulsante ‘Use Snippet’ sotto l’opzione ‘Add Your Custom Code (New Snippet)’.

How to show post excerpts using code

Nello schermo successivo, digitate un titolo per lo snippet di codice. Questo è solo per referer, quindi si può usare qualsiasi cosa si voglia.

Quindi, aprire il menu a discesa “Tipo di codice” e scegliere “Snippet PHP”.

Customizing your post excerpts using code

A questo punto, è sufficiente incollare quanto segue nell’editor del codice:

return 100;
}
add_filter('excerpt_length', 'new_excerpt_length');

// Changing excerpt more
function new_excerpt_more($more) {
return '...';
}
add_filter('excerpt_more', 'new_excerpt_more');

Questo codice modifica la lunghezza del riassunto dell’articolo a 100 caratteri. È possibile cambiare il valore “100” con un numero a piacere.

Dopo aver incollato il codice, attivare/disattivare l’interruttore da ‘Inattivo’ ad ‘Attivo’ in alto a destra e poi fare clic sul pulsante ‘Salva snippet’.

Save and activate code snippet WPCode

Per ulteriori suggerimenti su come perfezionare i riassunti degli articoli, consultate la nostra guida su come personalizzare i riassunti di WordPress senza codice.

Metodo 2: Aggiungere i riassunti degli articoli utilizzando l’editor completo del sito (solo per i temi a blocchi)

Se si utilizza uno dei temi WordPress a blocchi più recenti, è possibile aggiungere riassunti di articoli utilizzando l’editor completo del sito.

Per iniziare, andate su Aspetto ” Editore nella dashboard di WordPress.

Using the full-size editor (FSE)

Di default, l’editor del sito completo mostra il template home del tema, ma è possibile aggiungere un riassunto a qualsiasi template.

Nel menu di sinistra, fai clic su “template”.

Displaying post excerpts in WordPress using the full-site editor (FSE)

A questo punto verrà visualizzato un elenco di tutti i template che compongono il tema di WordPress. A seconda del tema, potreste voler add-on i riassunti al template archivia, indice, ricerca o simili.

È sufficiente trovare il template che si desidera modificare e fare clic.

Displaying post excerpts using the WordPress full-site editor (FSE)

WordPress mostrerà ora un’anteprima di questo template.

Per modificare il template, fate clic sulla piccola icona della matita.

Displaying post excerpts using the WordPress full-site editor (FSE)

A questo punto, fate clic sull’icona ‘+’.

Nel pannello di ricerca che appare, digitate “Post Excerpt”.

Adding the post excerpt block to a block-based WordPress theme

Quando appare il blocco giusto, trascinarlo e rilasciarlo nel layout.

È possibile ripetere questa procedura per aggiungere al template più articoli riassunti.

Adding the post excerpt block to a block-based WordPress theme

Per perfezionare l’aspetto del riassunto, basta fare clic per selezionare il blocco Articolo riassunto.

Nel menu di destra, si può iniziare scegliendo se il link “Leggi tutto” appare sulla stessa riga del riassunto utilizzando l’attiva/disattiva “Mostra il collega su una nuova riga”.

Adding a read more button to a blog archive page

A questo punto, selezionare la scheda “Stili”. Qui è possibile modificare il colore del testo, aggiungere un colore di sfondo, cambiare la dimensione del font e altro ancora.

Man mano che si apportano modifiche, l’anteprima dal vivo si aggiorna automaticamente, in modo da poter provare diverse impostazioni per vedere qual è la migliore.

How to customize a WordPress post excerpt

Quando si è soddisfatti dell’impostazione del riassunto dell’articolo, fare clic sul pulsante “Salva” per rendere effettive le modifiche.

Volete mostrare i riassunti dei post su più pagine e articoli? Allora ripetete i passaggi precedenti, ma questa volta scegliete un nuovo template dal menu di sinistra.

Metodo 3: Aggiungere i riassunti degli articoli a WordPress utilizzando un builder per temi (avanzato)

Se si desidera un controllo completo sull’aspetto dell’archivio, della pagina del blog, della homepage e del resto del sito, è possibile creare un tema personalizzato.

Questo vi permette di progettare le vostre pagine e di mostrare i riassunti in qualsiasi punto del vostro sito web.

SeedProd è il miglior builder di temi per WordPress che consente di creare facilmente un tema personalizzato per WordPress senza scrivere alcun codice. Dispone anche di un blocco Articoli già pronto che potete trascina e rilasciare su qualsiasi pagina.

Nota: esiste un plugin gratuito SeedProd che consente di creare bellissime pagine in modalità coming soon e maintenance, indipendentemente dal budget a disposizione. Tuttavia, per sbloccare il builder del tema è necessario il piano SeedProd Pro o Elite.

Per prima cosa, è necessario installare e attivare il plugin SeedProd. Per maggiori dettagli, consultate la nostra guida passo-passo su come installare un plugin di WordPress.

Dopo l’attivazione, accedere alla pagina SeedProd ” Impostazioni e inserire la chiave della licenza del plugin. Questa informazione si trova nel proprio account sul sito web di SeedProd.

Adding a SeedProd license key to WordPress

Dopo aver inserito la chiave della licenza, si è pronti a creare un tema personalizzato per WordPress utilizzando il builder di SeedProd.

Per prima cosa, è necessario andare alla pagina SeedProd ” Theme Builder.

The SeedProd theme builder

Qui è possibile utilizzare uno dei kit e template di siti SeedProd già pronti come punto di partenza o creare manualmente un template da zero.

Consigliamo di iniziare con un tema esistente, in quanto crea automaticamente tutti i template necessari e vi dà un vantaggio.

Detto questo, fate clic sul pulsante “Theme template kits”.

Creating a custom WordPress theme using SeedProd

È ora possibile scegliere uno qualsiasi dei template disponibili.

Tutti questi temi sono completamente personalizzabili, in modo da poterli adattare perfettamente al vostro blog o sito web WordPress.

Choosing a theme template for your WordPress website or blog

Dopo aver scelto un tema, SeedProd creerà automaticamente tutti i template necessari.

Si può pensare che sia la versione in bozza del tema personalizzato di WordPress.

Customizing the blog, archive, and search pages using SeedProd

È ora possibile personalizzare ogni template utilizzando l’editor di trascina e rilascia di SeedProd.

Poiché vogliamo aggiungere al nostro sito web dei riassunti degli articoli, passate il mouse sul template“Blog Index, Archives, Search” e fate clic sul link “Edit Design” quando appare.

How to add post excerpts to your WordPress theme with SeedProd

In questo modo viene caricato il builder SeedProd trascina e rilascia.

A destra, viene visualizzata un’anteprima del template. Come predefinito, il template della pagina del blog mostra l’intestazione, l’archivio, il titolo e tutti gli articoli.

The SeedProd drag and drop theme editor and page builder

Il lato sinistro mostra un menu con tutti i diversi blocchi che si possono utilizzare.

È possibile aggiungere nuovi blocchi trascinandoli sulla pagina e riorganizzarli trascinandoli verso l’alto e verso il basso con il mouse.

È possibile personalizzare qualsiasi blocco facendo clic su di esso e utilizzando le impostazioni nel menu a sinistra. Quando si apporta una modifica, l’anteprima di SeedProd si aggiorna automaticamente per mostrare le modifiche in azione.

How to customize any block in a WordPress theme

Poiché vogliamo personalizzare i riassunti degli articoli, è sufficiente fare clic per selezionare il blocco ‘Articoli’ nell’anteprima live.

Dopo aver fatto ciò, selezionare il contenuto che si desidera mostrare in questo blocco utilizzando le impostazioni nel menu di sinistra.

Ad esempio, è possibile modificare il layout delle colonne, visualizzare la paginazione, mostrare l’immagine in evidenza e cambiare la tagga del titolo.

How to add post excerpts to a WordPress theme without writing code

Per mostrare l’estratto dell’articolo, fate clic sull’attiva/disattiva “Mostra estratto” in modo che diventi arancione.

Una volta fatto ciò, è possibile modificare il numero di caratteri che SeedProd mostra nel riassunto digitando un nuovo numero in “Lunghezza del riassunto”.

Adding blog excerpts to a WordPress theme

SeedProd può anche aggiungere un collega “Leggi tutto” a ogni riassunto, che incoraggerà i lettori ad aprire l’articolo completo.

È possibile aggiungere o rimuovere questo collega utilizzando l’attiva/disattiva “Mostra leggi tutto”.

Adding a 'Read More' button to your post excerpts

È anche possibile sostituire il testo di “Leggi tutto” con un messaggio proprio, digitando nel campo “Testo di lettura”.

Quando si è soddisfatti dell’impostazione del riassunto dell’articolo, fare clic sul pulsante “Salva” nell’angolo superiore destro dello schermo.

Customizing the 'Read More' link in a post excerpt

È ora possibile personalizzare gli altri template di SeedProd andando su SeedProd ” Theme Builder e seguendo lo stesso procedimento descritto sopra.

Per mostrare i riassunti degli articoli ai visitatori, è necessario abilitare il tema SeedProd. A tale scopo, andare su SeedProd ” Theme Builder e fare clic sul pulsante “Attiva/disattiva il tema SeedProd” in modo che sia visualizzato “Sì”.

How to enable a custom WordPress theme using SeedProd

Ora, se visitate una qualsiasi pagina del vostro blog, vedrete i riassunti degli articoli dal vivo.

Bonus: mostra i riassunti per i contenuti protetti da password

Se avete un sito di membership, potreste avere alcuni contenuti non disponibili per il pubblico generale. È comunque una buona idea mostrare un riassunto dei contenuti protetti da password.

Questo può incuriosire gli utenti e incoraggiarli ad acquistare i vostri abbonamenti per avere accesso a contenuti esclusivi sul vostro sito web.

È possibile farlo facilmente utilizzando Restrict Content Pro, un popolare plugin per la protezione dei contenuti. Una volta attivato, è sufficiente aprire un articolo di vostro gradimento nell’editor a blocchi di WordPress, dove potrete aggiungere un riassunto dal pannello dei blocchi.

Successivamente, è possibile configurare le sue restrizioni dal menu a discesa.

Add an excerpt for the restricted post

Infine, pubblicate l’articolo e visitate il vostro sito WordPress.

In questo caso, gli utenti potranno vedere il riassunto e il titolo del contenuto limitato come qualsiasi altro articolo. Tuttavia, il contenuto stesso sarà nascosto al pubblico.

Protected content excerpt preview

Per istruzioni dettagliate, potete anche consultare il nostro tutorial su come mostrare un riassunto di un articolo protetto da password in WordPress.

Speriamo che questo articolo vi abbia aiutato a capire come visualizzare i riassunti degli articoli nei temi di WordPress. Potreste anche voler consultare la nostra guida su come fare soldi online facendo blog con WordPress e le nostre scelte di esperti sui migliori plugin e strumenti SEO per WordPress che dovreste usare.

Se questo articolo vi è piaciuto, iscrivetevi al nostro canale YouTube per le esercitazioni video su WordPress. Potete trovarci anche su Twitter e Facebook.

Divulgazione: I nostri contenuti sono sostenuti dai lettori. Ciò significa che se cliccate su alcuni dei nostri link, potremmo guadagnare una commissione. Vedi come WPBeginner è finanziato , perché è importante e come puoi sostenerci. Ecco il nostro processo editoriale .

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

Il kit di strumenti WordPress definitivo

Ottenete l'accesso gratuito al nostro kit di strumenti - una raccolta di prodotti e risorse relative a WordPress che ogni professionista dovrebbe avere!

Reader Interactions

94 commentiLascia una risposta

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Manasi says

    for the plane these this is what worked for me – Go to the home page and clkick edit. Go to the block editor and click on the block – Blog Posts. You will seea setting which states ‘post control settings’

    There you can enable or disable the show excerpt setting

  3. Dicado says

    Hi thanks for this. I don’t have those files in my child theme. If I just go ahead and do this in my parent theme, won’t it be erased if there is an update?

    • WPBeginner Support says

      Correct, if you place it in your parent theme and the parent theme is updated your changes would be lost

      Admin

  4. John says

    Thanks for this post. I also want to ask for help on how to add padding around excerpt. I have added border lines around my excerpt; the problem is the excerpt is touching the borderlines. How do I add padding around the excerpts, preventing it from touching the borderlines? Thanks in advance.

  5. Atul Jagtap says

    Hi their,
    I am using ‘Enlightenment’ theme but I have a problem that in my post I can’t see the short Post Excerpt ie it’s come blank. And this happened only with ‘Enlightenment’ this theme. Because same code I am using in other theme is working fine. So is anybody give me solution on this?

  6. Sara Pedersen says

    Hello

    I have custom excerpt in the excerpt box for each post. They are a photo link. This has worked for several years and the photo is at the top of the post with the post link below. Suddenly the last 2 posts the excerpt photo is not posting. Any tips to fix this?

  7. Siddhesh says

    Hi,

    I can locate index.php and categories.php in my theme folder but i dont find the mentioned syntax. How do i fix this?

    -Siddhesh

  8. Francesco says

    Hi, maybe my question will sound silly to you but… I never installed WordPress on a server/host, I just suscribed and got the .wordpress.com domain, everything was automatic. So, how can I access these files? I read in the comments about the FTP protocol, which I am familiar with, but who gives the information to enter in the domain with that?

    And while we’re at it, do you suggest to install wordpress by yourself (online I see there are a lot of tutorials and seems easy to do) or continuing as I am doing on the .wordpress.com domain? Maybe one day I will buy the premium and have a direct domain, but besides that, are there any advantages in terms of functionality in installing manually?

  9. Joseph Dabon says

    Very simple, huh! But where can I find these? – index.php file, archive.php file, and category.php

    • Javier says

      Hi, you can find those files using a FTP account.

      When you get in to your server files, get in into this route:
      wp-content/themes/ your-theme-name /

      And you will find the files

  10. Tolu says

    Hi there,
    My theme doesn’t support excerpts on the homepage, i’ve enabled excerpts on the blog post and its still not showing on the homepage, i’m not a php pro so i don’t know my way around it.

    Any help would be appreciated.

  11. Sreeharsh says

    Hi, My theme doesn’t support excerpts in the posts page.
    Can you please help me to enable it to display under my page title.
    Thank you. :D

  12. javad says

    hi
    my theme have excerpts option and i enabled it

    and i want to show my post images above this excerpts on index,php

    i used Auto Post Thumbnail and Featured Image plugins

    but i dont know code to show Thumbnail above the posts

  13. Dorine Ogutu says

    Hello, I am a beginner and I am using the Nucleare theme. I can’t find the index.php file. Please help.

    Desparate

    • Constantine says

      You will need to open either the terminal or your cPanel (if you’re using a shared host and it provides this feature), find your wordpress directory, and under the directory there’ll be a folder called “wp-content”, then enter “themes”, and then find the one folder that the name is your currently using one.

      If you’re using a terminal,

      type

      cd /…/…/wp-content/themes/

      and use cd to enter your themes folder that’s where your index.php lies. “…” here means your previous directory of your wordpress root directory, you will need to find that yourself and figure out what it is first you installed your wordpress on your server.

      Not sure if this helps since it’s been awhile, i’m a newbie myself so hope it might help you and others.

  14. Chris says

    I’ve just updated to a responsive theme and all the posts were in excerpt form. From reading this column I was able to change them to full content. What I’d really like is to have my current post in full content mode, so my followers see it as soon as they get on my site, and the older posts in excerpt form, so that the site loads more quickly. Is this possible? Thanks for your help!

    • James says

      @Chris, I’m trying to do the same thing. Did you figure this out (how to show the latest post in full mode, and the rest as “excerpts”)?

  15. Gaurav says

    I am using custom excerpts from wordpress. It is displayed on my home page. But it is not displayed on my original post. I want to display this excerpt just before my actual post with different font styles and font colour.
    Is there a way to do that ?

  16. pase says

    Trying to display a list blog excerpt summary after the blog introduction. Created a custom template for the blog front page. How can I call the blog excerpt summary page from the custom template?

  17. Drew says

    you know there’s a plugin that can resolve this. with ANY tutorials, it’s never 100% clear because there are files or scripts that are different or not available…pending multi-site install or single-site install etc etc. even with your simple instructions, i couldn’t find the proper tag to replace…so i just downloaded a plugin and 1 minute later…fixed.

    • Dawn Youngs says

      I am working in the Organization Theme on WordPress.com. I have managed to set up a static Home Page and a Blog Page which displays my recent posts. I have chosen the summary options for each article in my feed, but when I publish the page I see the full text of each post on my Blog Page. I have set featured images and I have Written Custom Excerpts for my pages and I want a Blog Page displays the excerpts and images with a link to the post page. How in the world do I do this? What is going on with no change between summary and full in the reading section of my settings? Is this an issue with the theme or a general problem in WordPress? I just want a clean simple page that shows a series of excepts for a weekly report, please help!

      By the way, I do not know how to open my files, I cannot even find my file directory, and wonder if it is hidden from me because I am in .com and not hosting the site myself like in .org?

  18. Rahul says

    I have used experts for some of my posts but i found a problem, special signs like,”! are not rendering properly and there’s some utf-8 problem… can you guys conform whether its a WordPress problem or my hosting. Though the problem only causes in my excerpts (summary) but the article with “are opening up fine” and can be read properly. If its a WordPress issue please let us know if there’s any solution to it.

    Thanks,
    RAHUL

  19. Seth says

    I am using the twentythirteen template. None of the files mentioned have “the_content” in them. Also, there is no longer a “loop.php” file. (I only want my archives – tag and category to have the excerpt).

    This is what I see in the archives.php and category.php:

    Changing ‘content’ to ‘excerpt’ also doesn’t seem to do the trick.

      • Imoteda says

        whenI change it in content.php, I can no longer see the full posts on any pages. Clicking on the continue reading link gives me the same excerpt

        • Jenn says

          I’m having the same issue. I successfully changed the_content to the_excerpt. This makes my blogroll successfully show the excerpt instead of the full post. However, when I click into a post, only the excerpt is shown. Is there a way to modify the single.php file to guarantee the entire post content is displayed when viewing a single post? Any advice is really appreciated!

  20. lester says

    finally . . . . FINALLY !!

    i FINALLY found an answer to a problem with wordpress.

    for the love of God and flowers and good food and wine!

    thank you !! thank you !! thank you !!

  21. Daniel Z says

    Thanks! This worked like a gem in the inStyle theme by Elegant Themes. I actually had to edit the code in home.php, but thanks for leading me in the right direction.

  22. Trenton Miller says

    This is great, it’s working for me now. I would like to have the images that I have at the beginning of blog posts that I inserted via HTML, not the Featured Image method. On the blog posts where the image is within the first 55 characters, or whatever you set it to, how can I get it to appear? Is there something extra to add into functions.php?

    • Editorial Staff says

      Automatic excerpts do not show HTML elements. You have two options. Either write a custom excerpt using the excerpts field in your write panel. If you don’t see it, then look at the top right hand corner “Screen Options”. The other option is to use the_content, and utilize the more tag.

      Admin

      • Caroline says

        Ouuch – thanks for your comment. I was searching for hours for this information. Such simple but well hidden if you don’t know how to add individual excerpts. Was looking to change the php files but did not dare for missing experience. All set now, thanks again.

  23. Dr. Erika says

    This is AWESOME. Seriously thank you wpbeginner for all your articles.

    Any idea of how to add pictures to the displayed excerpts?

  24. Bridget says

    OMG dude, thank you so much for this! I literally spent like 45 minutes trying to figure this out with an elegant theme, only to find that your solution took about 12 seconds. Gahh! Oh well, all is well that ends well! Thanks!

    • Deepak says

      Hye Sudip,
      Open any post to edit. On the top of it you will find the screen option. Click on that , then you will see so many options there. Then go to the excerpt option , check on that option. Then below the title and content box, you can see the excerpt box .You can write your excerpt content there.

  25. Jay Madisson says

    Hi,

    Im just wondering, where can I find the (Open your index.php file, archive.php file, and category.php file.)? Sorry for being a noob in HTML :(

    Cheers,

    Jay MAdisson

    • Jerry says

      I’m sorry, are we speaking here of files that reside on my computer? I thought the whole blog was done online. I have no software for WordPress on my computer. I have not downloaded anything. What am I missing? Does one have to know HTML code to blog?

  26. Rich says

    Hello, I’m using the 2010 theme on the blog and it didn’t change to when I replaced content with the word excerpt. Is it something I’m leaving out??

  27. Emma says

    I am using the new twenty twelve theme to base a child theme on and cannot get excerpts to work at all. I looked in all the files you suggest above, but cannot find
    in any of them. Similar to Heather I have imported my blog from blogger too…
    There also doesn’t seem to be a loop.php file
    Help!

      • Emma says

        Thanks for this – I changed entry-content in content.php to

        and it has worked!

        The problem I have now is how to get the excerpt text to wrap around the thumbnail, which I would like to float either right or left.

        Any ideas?

        Thanks

  28. Erin says

    Maybe you can help me here. There is no in any of the files you listed above; index.php, archive.php, or category.php. This is the closest thing that I see (from my index.php file).

    Can I change something in this code or add some new code?

    • Editorial Staff says

      If none of those files exist, that means you are using a child theme. You will have to utilize the hooks in the parent theme framework. We don’t write tutorials specific for theme frameworks.

      Admin

  29. Chris says

    I’m using the twentyeleven theme and “the_content” does not appear in any of the three files mentioned. I’m stumped.

  30. HemantKokcha says

    I am trying to get excerpt but i cant get excerpt by both of your method so tell me correctly how wll i get excerpt in traction theme.

    • wpbeginner says

      @HemantKokcha There is only one method… changing the_content to the_excerpt… The other function is to controlling excerpt length and the excerpt read more. If its not showing in your theme, then perhaps try contacting the theme author. Because this is the only way of doing it.

  31. clwdk says

    Hi there,

    I am using the newest version of the twenty ten theme and am not sure where to change the <?php the_content(); ?> to <?php the_excerpt(); ?>. There is nothing in the index.php as far as I can see. Am I overlooking something? Thanks for any help you can give me.

    CARL

  32. wpbeginner says

    @Ibadullah You have to add this code in your theme’s functions.php file. It should work perfectly fine because this is the way to do it, and we are doing it on our site.

  33. Ibadullah says

    @wpbeginner@Ibadullah I am saying when I add the number in post excerpt – I just see the same number on main page. such as I type 50 in the post excerpt field it show Category name : APPLE and instead of content it show number 50

  34. nescafespk says

    <a href=”http://www.games-masti.com” title=”Play Online Games”>Play Online Games</a>

    This is very nice trick and thanks for help us and thanks for the whole team of the word press team

  35. Carl says

    Great – thanks. Was looking for a simple solution. How do you include a Read more… link after the excerpt also though?

  36. Heather says

    Thank you for the article. I made the changes in all 3 documents and nothing changed. All of the posts on the blog I am working on were imported from Blogger, could that be an issue or perhaps the theme itself? I am stumped!

Lascia una risposta

Grazie per aver scelto di lasciare un commento. Tenga presente che tutti i commenti sono moderati in base alle nostre politica dei commenti e il suo indirizzo e-mail NON sarà pubblicato. Si prega di NON utilizzare parole chiave nel campo del nome. Avremo una conversazione personale e significativa.