Languages: English • العربية • Español • Français • Português do Brasil • Русский • 日本語 中文(简体) • (Add your language)
The WordPress Excerpt is an optional summary or description of a post; in short, a post summary.
The Excerpt has two main uses:
To add an excerpt to a post, simply write one in the Excerpt field under the post edit box. An excerpt can be as short or as long as you wish. Usually, given its purpose, a couple of sentences is fine. If adding the excerpt manually, you may use (some) HTML formatting and the tags will not be stripped.
Note: As of WordPress version 3.1, some screen options on the Post & Page edit Administration Panels are hidden by default. The Excerpt field is hidden by default if it has not been used before.
Interestingly, since the WordPress excerpt is similar in purpose to the META description of (X)HTML documents, excerpts can additionally be used as meta descriptions too. Some themes do this by default. It can also be done by means of an SEO plugin or a plugin for managing data in the head of (X)HTML pages.
When using the excerpt feature WordPress does not automatically provide a link to a page containing the full post. To generate a link include the following code in the loop directly below <?php the_excerpt(); ?>
<a href="<?php echo get_permalink(); ?>"> Read More...</a>
Or put the following in your theme's functions.php.
function new_excerpt_more( $more ) { return ' <a class="read-more" href="'. get_permalink( get_the_ID() ) . '">' . __('Read More', 'your-text-domain') . '</a>'; } add_filter( 'excerpt_more', 'new_excerpt_more' );