Codex tools: Log in / create account
Contents |
Retrieves the post excerpt.
the_excerpt() function outputs the value returned by get_the_excerpt().
<?php get_the_excerpt( $deprecated ) ?>
$deprecated is not required.
get_the_excerpt() can be used to retrieve and store the value in a variable, without outputting it to the page.
<?php
$myExcerpt = get_the_excerpt();
if ($myExcerpt != '') {
// Some string manipulation performed
}
echo $myExcerpt; // Outputs the processed value to the page
?>
get_the_excerpt() is located in wp-includes/post-template.php.