Skip navigation

Display Post Excerpts Only in WordPress

Set number of posts on front page to displayPersonally, when I visit the front page of a WordPress blog, I don’t mind seeing the full content of each recent post. You an control how many posts are found on the front page of your full version WordPress blog by choosing Options > Reading > Show Number of Posts on the Front Page in the Administration Panel on the full version of WordPress and Blog Pages: Show at most… on WordPress.com blogs. Choose whatever number you like. Depending upon the length of your typical posts, this could be 1, 3, 5, or even 25. Whatever you feel is appropriate.

However, when I do a search on a WordPress blog, or visit the categories, archives, or any other multi-post pages, I’m intent on finding what I want, not reading through every post that may or may not apply. I’m on a quest, so I want information fast. This particular WordPress Theme, Rubric by Hadley Wickham, shows full posts on search and category pages - check it out (NOTE: The first post you see may be this post so scroll down the page) and witness my frustration. I’d love to change it, but I have no control over WordPress.com Themes.

I believe excerpts, especially in search results, helps the reader get to the information they need faster, making them happier readers, thus I’m in favor of using excerpts on multi-post pages in all WordPress Themes, not full content views.

Creating excerpts in multi-post views is the job of the WordPress Theme designer, and one of the choices they have. If you are using the full version of WordPress and have access to your Theme template files, you can change it to excerpts from full post displays yourself.

Changing the Full Post Content to an Excerpt

WordPress makes changing your content displays on your own full version WordPress easy. To change the way your content displays on these pages, edit the appropriate template files with the built-in Theme Editor (Presentation > Theme Editor) or any text editor and search for the_content() and change it to the_excerpt(). That’s it.

WordPress code for the_content template tagWordPress code for the_excerpt template tag

The multi-post displaying template files to change may include:

  • index.php
  • archives.php
  • archive.php
  • category.php
  • search.php

Do NOT change it in your single.php or page.php, if you have them in your Theme, as that will force only the excerpt and not the full content to show up on these single post views of your blog. Not a good thing.

By default, WordPress shows only the first 120 words or so of a post as the excerpt. It also strips out all links, styles, and tags so only the text appears. So if your excerpt doesn’t exactly match the look of the top part of your post, this is why.

There are two other ways to set your excerpt, which should work with , overriding the_content() template tag.

On the Write Post panel in the Quicktag buttons, there is a button called more. Set your cursor to wherever you want the excerpt to be set and click it. It will inset <- - more - -> into your post. On the front page of your blog, the excerpt of the post will show until that point. When the visitor clicks the “read more” or “continue reading” link, they will be taken to that point so they can continue reading without having to read over what they have already read.

Using the WordPress quicktag button more to set an excerpt point in the post

The other method is to write an explicit excerpt. Under the Upload Image box on the latest versions of WordPress, or between the title and post content of the old versions, you will find the Optional Excerpt box. Click on the + plus mark in the upper right corner to expand the box. Type in whatever you want for the excerpt and it will be shown on the front page.

Writing an explicit excerpt using the Optional Excerpt section on the Write Post panel in WordPress

Going Beyond the Simple Excerpt View

On Taking Your Camera on the Road, I wanted three different types of excerpts shown. It works so well, you don’t even notice unless I tell you what I did.

By default, the WordPress excerpt shows the first 120 words of the post. I tend to write really long posts, and there are times when I need to have the excerpt be a summary of the post rather than the first paragraph or two. Yet there are times when I want the whole post to show because it is short and to the point. I needed to set up the excerpts with a query that asks:

  1. If post content has an explicit excerpt,
    display the explicit excerpt.
  2. If post content uses the <!- -more- -> to mark the ending post of the excerpt,
    display this excerpt.
  3. If post content uses NO EXCERPT,
    display the entire post.

If this sounds like something of interest to you, I explain it fully, with the solution, in my article on Customizing the WordPress Loop for Excerpt Queries.

If you are ready to turn over some of your multi-post pages to excerpts, then also take time to read Writing With Post Excerpts and Feed Excerpts in Mind to help you think about how you write when your blog displays excerpts.

Related Articles


Site Search Tags: , , , , , , , , , , , , , , ,
Copyright Lorelle VanFossen, member of the 9Rules Network

Member of the 9Rules Blogging Network

9 Comments

  1. Posted July 19, 2006 at 3:52 pm | Permalink

    Using the more button is a good idea but to me it has a little drawback especially if you use Technorati tags. I am not very sure of this but I noticed that Technorati robots always skipped my posts everytime I used the more button.

    I am using Optional Excerpt and include the tags at the bottom. Technorati never missed my new post.

    What I would like to see is the use of Show/Hide button instead of the usual - WP reads the whole page again and display it(like a refresh or reload). This way it would be faster for our readers and probably save some bandwidth.

  2. Posted July 27, 2006 at 4:47 am | Permalink

    Hiya. Thanks for the great article; it really helped!

  3. Posted July 26, 2007 at 3:21 am | Permalink

    Hi there

    Thanks for that article. You helped me solve a big problem with the excerpt that I’d been having for days.

  4. Posted August 4, 2007 at 3:57 pm | Permalink

    Thanks for these tips. The new theme that I added to my blog, would show all of the post in the category and I don’t like this either. I am like you, when I want to find something, I want to find it fast. Thanks for writing this post. I think that I will write a post about this and give you a backlink by referring people to this post.

  5. kill
    Posted March 13, 2008 at 9:25 am | Permalink

    Your site has become my favorite site!

  6. Posted March 17, 2008 at 10:46 pm | Permalink

    Thanks for the info

  7. Posted April 2, 2008 at 4:36 pm | Permalink

    Thanks. Now I know what the does, and it’s exactly what I was searching for.

  8. Posted May 8, 2008 at 6:12 am | Permalink

    Thank you, your post help me.

  9. Posted May 8, 2008 at 2:21 pm | Permalink

    Thank you for writing straightforward instructions in English. I’ve been to the Codex a few times and still didn’t get it.

    Your instructions I got right away. Thank you!

12 Trackbacks/Pingbacks

  1. [...] I recently described how to change full post displays to excerpts on multi-post views of your WordPress Theme. If you use post excerpts on your WordPress or WordPress.com blog and excerpts in your feeds, you need to think about writing with excerpts in mind. [...]

  2. [...] Lorelle is all over excerpts, explaining them in great detail. [...]

  3. [...] Well WordPress installed without any hitches or issues whatsoever. Fantastic stuff. I then found this great little tutorial for showing WordPress posts on pages outside of the WordPress install directory. Again, very simple stuff. And thanks to this little tip, I also changed the PHP code on the homepage to only show excerpts, not full posts. Now all I have to do is create a theme for my WordPress install which matches the rest of the site… should be interesting! I’ll keep you to date with my progress. [...]

  4. [...] 1) Lorelle on WordPress, who taught me how to create excerpts on my home page so you all don’t have to scroll through my pages of thought when you don’t want to. Thank you for taking the time to teach newbies something small but so very useful. 2) Open Office Org, who created the wonderful, useful FREE office software that I use daily. I encourage every single person reading this to download it and try it out. You will have access to any office document regardless of format (MS Word users, you can read WordPerfect documents!), save to any format, and a myriad other beautiful functions in many languages. OOO, thank you! [...]

  5. [...] Display Post Excerpts Only in WordPress [...]

  6. [...] post pages.  The process of changing your blog’s template to show only excerpts is explained by Lorelle, a WordPress [...]

  7. [...] make your blog look better in my opinion. If you would like to learn how to change this, read on at Lorelle on WordPress. Lorelle has put together a nice little tutorial that is dedicated to helping to fix this problem [...]

  8. [...] damn, I can’t find a good tutorial for this. Lorelle explains a related issue in her post on displaying post excerpts only, so it will get you started. I’m also using the Homepage Excerpts plugin to make the posts [...]

  9. [...] damn, I can’t find a good tutorial for this. Lorelle explains a related issue in her post on displaying post excerpts only, so it will get you started. I’m also using the Homepage Excerpts plugin to make the posts [...]

  10. [...] Display Post Excerpts Only in WordPress- A good way to ensure your posts don’t show up in suplemental results since Google can find [...]

  11. [...] Display Post Excerpts Only in WordPress/为什么要让WordPress显示文章摘要- [...]

  12. [...] to shorten our feed. The truth is, we don’t shorten our feed, we shorten the post. There are steps we can take to shorten the post and leave our feed intact, but I haven’t been able to get it to work [...]

Post a Comment

Your email is never published nor shared.