Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
WordPress Plugins
View all Guides

How to Display Post Excerpts in WordPress Themes

Last updated on by
Special WordPress Hosting offer for WPBeginner Readers
How to Display Post Excerpts in WordPress Themes

Some of our users wanted us to post a tutorial on how to display Post Excerpts in WordPress Themes. This is a very simple tutorial that anyone can implement and take advantage of this built-in feature. The benefit of implementing this tutorial is that it decreases page load time and it increases the pageview count.

How does it Decrease Page Load Time?

If you write long posts like best practices of contact forms or must have iphone apps for bloggers which has a lot of images, then having them load on one page can significantly impact your page load time. By adding this technique, you can simply show a mini description of the article and let user view the post on single post page.

How does it Increase Page View count?

Sometimes users just read the post on the category page if you don’t use the excerpt. By adding it this way, they will go to the original post. That is 2 page views instead of 1. It also encourages users to make a comment on the post because comment form is also on this page and they don’t need to load a separate page to make a comment.


Open your index.php file, archive.php file, and category.php file. Now some of you might not have all these files in your template, so just open the ones that you do have.

Find the following code:

<?php the_content(); ?>

And replace it with:

<?php the_excerpt(); ?>

Now you can write custom excerpts for your posts from your WordPress admin panel and have it displayed in your theme.

Add Post Excerpts in WordPress

If you do not write a custom excerpt, then WordPress automatically takes the first 55 words from your post and put them in an excerpt with elipses and display it. You can change the word limit starting from WordPress 2.9. If you want to change the word limit open your functions.php file and add the following function:

// Changing excerpt length
function new_excerpt_length($length) {
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');

If you want to see this code working live, just click on any of our categories from the navigation menu and you will see that we do not display full posts.

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »


  1. javad says:

    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

  2. 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.


    • 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,


      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.

  3. 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”)?

  4. mohammad says:

    hi. i have problem with Excerpt in my site:

    please help me

  5. gazi says:

    thanks a lot

  6. Puneet Bhalla says:

    Great post , just shares the required solution. Thanks.

  7. 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 ?

  8. 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?

  9. 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.

  10. Sorin says:

    For me was in wp-content/themes/theme/post.php where theme is my theme name. Thanks alot!

  11. WPBeginner Staff says:

    put it right before or line.

  12. WPBeginner Staff says:

    put it right before or line.

    • Dawn Youngs says:

      I am working in the Organization Theme on 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?

  13. 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.


  14. Kouami Sessou says:

    I wanted to use excerpt for “summary” or short description for my posts..
    It doesn’t work, when excerpt is not available for the post.

    Looking for a plugin

  15. Stefan says:

    Many thanks for the write up!

    Helped me out a lot! :-)

  16. 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.

    • WPBeginner Support says:

      Seth Twenty Thirteen uses content templates you will find the loop in content.php.

      • 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!

  17. Yaz says:

    Thanks, but how do I get it to show an image too?

    • WPBeginner Support says:

      you can use <?php the_post_thumbnail(); ?>> in your template.

      • Celina says:

        I think I’ve been looking for this very answer. My blog shows only excerpt (summary) or the featured image- never both. Where does this code go, please?

      • Celina says:

        Where exactly does this go, please? I’m looking in content.php, but I don’t know where exactly. Thank you.

  18. 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 !!

  19. 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.

  20. 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.

      • 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.

  21. 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?

  22. 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!

  23. Sudip says:

    The excerpt box is not appearing on my PC. Please help me.

    • 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.

  24. Jay Madisson says:


    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 :(


    Jay MAdisson

    • Editorial Staff says:

      It would be in your /wp-content/themes/themename/ folder.

      • Jay Madisson says:

        Hi, Im using Easel Theme, I opened index.php and archive.php but I could not find the code

    • 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?

  25. 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??

  26. 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

    • Editorial Staff says:

      The twenty twelve theme uses content.php and various variations of those.

      • 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?


  27. 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.

  28. Chris says:

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

  29. 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.

  30. wpbeginner says:

    @clwdk You would need to change the loop.php file for the archive.

  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.


  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. wpbeginner says:

    @Ibadullah That is the whole point of this article.

  35. Ibadullah says:

    It keep showing me the number I add in post excerpt instead of post content!

  36. nescafespk says:

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

  37. nescafespk says:

    <a href=”” 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

  38. Carl says:

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

  39. 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!

    • Editorial Staff says:

      Nope that can’t be the issue. By changing to the_excerpt it would automatically generate the excerpt.

  40. ely says:

    I can’t seem to find any files containing “php” anywhere on my wp dashboard.

    I’m using dreamhost and the wp 2010 theme. The only files I can find that allow me to edit code are .css files.

    I’m going crazy trying to find a way to create excerpts!

  41. chris h says:

    thanks! just changing the index.php ‘content’ to ‘excerpt’ did the trick…

  42. Technonesia says:

    My acquaintance is asking for this and I remember to ever saw it here. Thanks, I will forward this to him.

  43. Scott says:

    I understand the excerpt thing but how do I then get it to show the image thumbnail along with the excerpt?

  44. chris says:

    Great, I was just looking for an easy way to make use of the excerpts field and be able to define a small intro for each post to be displayed. Thanks a lot.

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.