There are three common ways of showing post excerpts in WordPress. In general bloggers use more tag (present in WordPress visual editor), some use excerpts metabox present on post edit screen and some use built-in functionality of some WordPress theme or plugin for generating excerpts automatically.
But you might have noticed that while generating automated excerpts which are shown simply by entering a word count, sometimes cut down the word or sentence at the end.
This tutorial is about an awesome WordPress plugin that not only allows you to generate excerpts but also provides you advanced options and controls for generating and customizing them more easily.
Advanced Excerpt is a WordPress plugin that lets you control the appearance of WordPress post excerpts:
- It keeps HTML markup in the excerpt (and you get to choose which tags are included)
- Trims the excerpt to a given length using either character count or word count
- Only the ‘real’ text is counted (HTML is ignored but kept)
- Customizes the excerpt length and the ellipsis character that are used
- Completes the last word or sentence in an excerpt (no weird cuts)
- Adds a read-more link to the text
- Ignores custom excerpts and use the generated one instead
- Theme developers can use
the_advanced_excerpt()
for even more control
Start by installing and activating Advanced Excerpt plugin in WordPress
Upon activation visit your admin area dashboard Settings -> Excerpts page and choose your options.
‘Finish’ option allows you to prevents cutting a word or sentence at the end of an excerpt. It may result in slightly longer excerpts.
For avoiding cutting down of sentence in your excerpts, tick ‘Sentence’ check box and if you just want this only for words, then select ‘Words’ check box.
There are even more options like you can auto insert ‘Read More’ link in your excerpt, you can set custom excerpt length, disable the plugin on selected sections of your website and more.