Have you ever wanted to display a different post summary or excerpt on your blog page or rss feed?
When i say different, i mean different to what WordPress or your theme automatically generates.
By default, your WordPress theme automatically generates a few lines for display in:
- Different archives – Author, Category, Tag etc
- RSS feed – If you have set it to display a summary rather than full text
- Your blog page post teasers which may also be your home page
- Meta Description which is displayed in search results
You’ll find the excerpt box below every Edit post screen.
If it’s not showing there, go to your screen options tab in the top right hand corner of every screen and from the drop down, check the box to display it.
Adding a custom excerpt in this box will change the post summary WordPress automatically generates meaning it won’t be the same as the first few lines of your post content.
Additionally, if you have a SEO plugin installed, it may also change the meta description snippet which is displayed in the search results.
This depends on what you wrote last. The excerpt or the meta description.
If you add a meta description and then an excerpt, the excerpt will be displayed as the meta description rather than the custom meta description you added previously.
Lets take a look at an example of this post that i have written:
The above screen shot shows the excerpt which is the same as the meta description displayed in the Snippet preview using the WordPress SEO by Yoast plugin below.
If you are using this plugin you’ll also notice that the meta description field is blank even though its displayed in the snippet and different to the first few lines of the post content.
Why Add a Custom Excerpt?
- If you have problems with scrappers copying your RSS feed, you may want to use the excerpt field. This will create some totally unique content that’s not in your post content.
- You may want to add sales copy that draws in your readers but doesn’t contain keywords.
- You may want a summary that totally different than what the first few lines of your post contains.
- You may want an excerpt that’s totally different to whats displayed in the search results snippet.
Here’s a full page screenshot showing 3 different excerpts:
- Post content first line
- Default Genesis theme SEO settings for meta description
- Native WordPress Excerpt box
You can see from this example that once the post is published, the blog page which contains the post teaser, archives and search results pages, will all contain a different post summary or excerpt.
When you click on the post teaser, the content you read on the first line or two will be different to what you have added in the excerpt field.
Post Excerpts On Pages
You can also add excerpts on pages.
Simply paste this PHP code at the end of your child themes functions.php file.
The excerpt field allows you to add summary which is different from your post summary teaser as well as potentially being different than the search results snippet.
You can also add an excerpt field to your pages by adding a plugin or some code to your child themes functions.php file.
And you also add HTML tags in the Excerpts meta box as well. Otherwise you default excerpts will not contain HTML tags. You can add HTML tags back to post excerpts simply by adding some code to your child themes functions.php file.