Customize WordPress post excerpt with Advanced Excerpt

With the Advanced Excerpt plugin you can customize the WordPress post excerpt and determine how excerpts are generated and how long they are. In addition, the removal of HTML and shortcodes in the excerpts can be deactivated.

When is the WordPress post excerpt used?

WordPress themes show either the full content of the post or an excerpt for categories, authors and keywords in the blog and in the archives.

When the full post is displayed , the more tag is available to shorten the post on overview pages at a point selected by the user. However, if the theme only shows the contribution excerpt instead of the entire contribution, the more tag has no effect.

The contribution excerpt - called excerpt in English - can be added manually in an additional Metabox excerpt when a new contribution is created or edited.

If this box is not displayed, you can activate it in the display options. To do this, click on the Customize view link in the upper right corner in the WordPress backend when you create a new post.

Very often, however, one does not want to specify an extract for every contribution. WordPress then automatically creates a contribution excerpt, if this was not entered manually.

Automatic generation of the WordPress post excerpt

The contribution excerpt is generated from the normal content of the contribution.

WordPress removes the entire HTML code, so that pure text remains. All text formatting, embedded media such as images or videos, but also shortcodes are no longer included in the post excerpts.

By default, WordPress uses the first 55 words of the content for the excerpt. However, themes often override the default value of 55 and specify a different number of words. Sometimes there are also options to adjust the length.

Overall, excerpts are very limited with the limitation to pure text.

This is where the Advanced Excerpts plugin comes into play.

Advanced Excerpt

With the plugin you get control over the excerpts and can configure exactly how excerpts are generated, how long they are and whether HTML and shortcodes are removed. You can download Advanced Excerpt from the WordPress.org plugin directory.

Control the appearance of WordPress post excerpts

By: WPKube

( 85 )
Last updated: 2 weeks ago
90,000+ active installs
Compatible up to: 5.6

The plugin hasn't been updated for two years, but is still fully functional. The filters for post excerpts have changed little and Advanced Excerpt ran without problems in my tests with WordPress 4.9.2.

Configure the settings for the contribution statement

After installing the plugin, you can find its options under Settings → Excerpt in your WordPress backend.

In the first option, Excerpt Length, you can determine the length of the excerpt. You have the option of shortening the contribution statement according to a certain number of words or characters (letters, numbers).

You can also specify whether the excerpt should be exactly the same length, which means that the last word or sentence may be cut off in the middle. Alternatively, the plugin shows the excerpt up to the end of the word or complete sentence.

More options for excerpts

If the theme does not display a button to continue reading, the plugin can also add a read-more link after the excerpt. Additional checkboxes can be used to deactivate shortcodes and manual contribution statements if desired.

By activating the_content () checkbox, Advanced Excerpt can also replace full posts in the blog and archives and display an excerpt instead. This means that the plugin is compatible with every theme, regardless of whether it shows post excerpts by default. You can also set the archives on which the plug-in is actually used.

HTML code can be allowed completely or restricted to certain tags.

Finally, a complete overview of the options. Image from the WordPress Plugin Repo.

All options from WordPress Advanced Excerpt
All options at a glance. Source: wordpress.org

Conclusion

Advanced Excerpt is a useful plugin that adds practical features to the WordPress article excerpt. This also enables the use of HTML in excerpts. Especially if your theme does not have its own options for configuring the extracts, you can use the plugin to make adjustments for this very easily.