An excerpt is defined as a short extract from a body of text. In WordPress, the excerpt is the text which shows on the front page as a summary of each blog post. The length is usually twenty five words or less and the last character is the “…”.
If left to its own devices WordPress will grab the first twenty five words from the blog content and remove any special formatting. Although this is the easy solution it comes with some risks.
Headers and Custom Formatting
In the circumstance the contents begins with a header, the header will be thrown in the mix stripped of formatting.
For example content which begins with a header titled “Introduction” followed on the next line with the sentence “I would like to introduce you to …” would produced the excerpt “IntroductionI would like to introduce you to …”.
May not Entice Reader to “Read More”
The goal of the excerpt and the first paragraph of content is not the same. The goal of the excerpt is to entice the reader to click the “Read more …” link. The goal of the first paragraph is to introduce what is to come. In some cases they can be same, in others – not.
Xidipity has a very easy solution, the excerpt template and its easy to use.
<p class="excerpt-template">Place excerpt here ...<span class="hidden"><!--more--></span></p>
For this to work the template must be place at the very top of the content. The “excerpt-template” class instructs the browser to hide the excerpt after WordPress has read it. The last line which is hidden tells WordPress this is the end of the excerpt if the word count is less than twenty five.
- Highlight the template code
- Copy to clipboard
- Place cursor at the beginning of the content
- Click the editor “Insert ” menu dropdown
- Select “ Media”
- Select the “Embed” tab
- Paste clipboard content into the text box
- Click the “OK” button
The excerpt text can be created after the container has been inserted by replacing “Place excerpt here” with your content. Do not worry about the twenty five word limit. If the boundary is exceeded, WordPress will clip the content to fit.