WordPress Complete(Sixth Edition)
上QQ阅读APP看书,第一时间看更新

Excerpt

WordPress offers theme designers the option to show a post's Excerpt (instead of its full content or lead+body) on pages within the theme:

This is how the excerpt works:

  • If you enter some text into the Excerpt box on the Edit Post page, that text will be used as the post's excerpt on the pages that call for it.
  • If you do not enter any text into the Excerpt box, WordPress will use the first 55 words of the post's content (which is stripped of HTML tags) followed by [...] (which is not a link).
  • If you do not enter any text into the Excerpt box, and the theme you are using does something special, the number of words and the final text could be different.

You are never required to enter excerpt text. However, it is advisable that you do take advantage of this possibility. Excerpts can introduce big readability improvements to your site, and make your content easier to grasp for the reader, provided that your current theme uses excerpts in one way or the other. In some cases, excerpts also give your site additional SEO benefits - provided that your theme displays them in places where Google and the other search engines can see them.

The more tag ( <!--more-->), which has been described in one of the previous sections in this chapter, should not be confused with the excerpt. It is different from the excerpt because of you, not the theme designer, controls its use. Additionally, the more tag is supported by every theme and has a slightly different task than the excerpt. It's meant to present the lead of the post, the part that's going to convince the reader to visit the complete post, while the excerpt is a summary of the post's contents.