Beginner's Guide for WordPress / Start your WordPress Blog in minutes

How to Display Post Excerpts in WordPress Themes

Do you want to learn how to display post excerpts in your WordPress theme?

By displaying post excerpts instead of the full article on your blog, you can increase pageviews, reduce loading speeds, and create a better experience for your users.

In this article, we’ll show you how you can easily add post excerpts to your WordPress theme.

How to display post excerpts in WordPress themes

Why Display Post Excerpts in WordPress?

Post excerpts are commonly used on blog index and archive pages to avoid displaying the full text for every article on your WordPress site.

By default, WordPress will show full posts on your home page, blog page, and archive pages across your website. WordPress does have built-in support for displaying post excerpts, but not every theme will take advantage of this.

Using excerpts can help to speed up WordPress since only a portion of each article will be loaded.

Plus, it can increase your pageviews since your visitors will have multiple blog posts to choose from, instead of a single long post.

That being said, let’s show you how you can display post excerpts in your WordPress theme.

Check if Your WordPress Theme Supports Post Excerpts

Most popular WordPress themes will already come with built in settings to display excerpts of your posts.

You can find this in your WordPress theme settings panel, or by going to Appearance » Customize and then clicking the ‘Blog’ menu option.

Go to WordPress customizer click blog

This brings you to a screen where you can customize your WordPress blog and archive page settings.

Simply click the ‘Blog/Archive’ menu option.

Click blog and archive menu option

After that, scroll down to the bottom of the menu to the ‘Post Content’ section.

Then, click the ‘Excerpt’ button.

Turn on post excerpt option

That’s it! Don’t forget to click the ‘Publish’ button to save your changes.

This will enable post excerpts for your WordPress theme. Depending on the theme you’re using, the menu options might be slightly different.

Display Post Excerpts by Adding Code to WordPress

If your theme doesn’t have built-in support for post excerpts, then you’ll need to add it manually.

You can edit your WordPress theme files directly, but we recommend creating a child theme. That way, when you update your WordPress theme you won’t lose the changes you’ve made.

For more details, see our beginner’s guide on how to create a WordPress child theme.

Once you’ve created your child theme, you need to find the right template for the pages you want to display post excerpts. For most themes, this will be the home.php, content.php, category.php, and archive.php.

For help finding the right template file to edit, see our beginner’s guide to WordPress template hierarchy.

After that, you need to locate the following code in each of the files:

<?php the_content(); ?>

Then, you need to replace it with the_excerpt tag, like the code below:

<?php the_excerpt(); ?>

After you save your files, your post excerpts will display where the full article used to be.

Change the Default WordPress Excerpt Length

Once you’ve added post excerpts to your WordPress theme, you might want to change the post excerpt length. By default, WordPress will take the first 55 words of the post and add an ellipsis (…) to the end.

You can change this by adding code to your WordPress files. If you haven’t done this before, then see our beginner’s guide pasting snippets from the web into WordPress.

Then, you need to add the following code to your functions.php file, in a site specific plugin, or by using a code snippets plugin.

// 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');

This code changes the post excerpt length to 100 characters. You can change the ‘100’ to your preferred character length.

If you want even more options for customizing your post excerpts, then see our guide on how to customize WordPress excerpts with no code.

We hope this article helped you learn how to display post excerpts in WordPress themes. You may also want to see our guide on how to choose the best web design software and our expert picks of the best payroll software for small businesses.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit – a collection of WordPress related products and resources that every professional should have!

Reader Interactions

93 CommentsLeave a Reply

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

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

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


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

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

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

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


  7. Hi, maybe my question will sound silly to you but… I never installed WordPress on a server/host, I just suscribed and got the 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 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?

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

    • 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

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

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

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

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


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

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

    • @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”)?

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

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

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

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

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


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

      • 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

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

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

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

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

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


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

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

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

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

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


    Jay MAdisson

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

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

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

    • 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. I’m using the twentyeleven theme and “the_content” does not appear in any of the three files mentioned. I’m stumped.

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

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


  31. @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.

  32. @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

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

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

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

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.