What is Excerpt in tag in wordpress? Tips and Tricks !
What is a WordPress Excerpt?
A WordPress excerpt is basically a summary of a longer article, often used as a replacement on the blog index and archives pages to avoid needing to display the full content of each post.
For example, displaying the full content for 10 posts that are 1,000 words each means that your blog listing pages will contain ~10,000 words, which is an unmanageable wall of text for most users.
Excerpts allow you to slim this down by showing short summaries instead of the full text of each post:
Do All Themes Display Excerpts?
Whether or not a theme displays excerpts is entirely up to the theme developer. The WordPress software includes built-in functionality to handle excerpts – but not all themes make it easy to take advantage of this functionality.
Later in this post, we’ll discuss a way in which you can try to force your theme to display post excerpts instead of full content.
How Are WordPress Excerpts Generated?
There are two potential methods for WordPress to generate excerpts for your posts:
- Automatically – by default, WordPress generates excerpts by simply selecting the first 55 words of a post.
- Manually – with a minor tweak, you can manually edit the text to use for each post’s excerpt.
The advantage of the manual method is that you’re not limited to just the text at the beginning of a post – you can create a full summary if you’d like.
How to Enable Manual Excerpts in WordPress Editor
To enable manual excerpts in the WordPress Editor, create a new post like normal by going to Posts → Add New.
Then, click the Screen Options button in the top-right corner of the interface:
In the slide-down menu that opens, check the box for Excerpt:
Now, when you scroll down in the WordPress Editor, you should see a new meta box named Excerpt:
You can enter your own manual excerpt in this box. It won’t affect your regular post content – just the excerpt generated by your theme.
How to Make Your Theme Display Excerpts
As discussed, some themes give you an option in the theme settings to display excerpts on your blog index pages.
These options are usually contained in either:
- The WordPress Customizer
- A custom theme settings panel
If your theme doesn’t offer such an option, you can still force it to use excerpts by manually editing the theme template files.
While the code change is simple, this is still somewhat of an advanced method – if you don’t feel comfortable editing your theme’s template files directly.
How to Edit A Theme’s Code to Make It Display Excerpts
Note – this guide will not apply to all themes. Many themes break apart their code into different parts. Without a basic understanding of the WordPress loop, you may struggle to make these changes.