WordPress.org

Ready to get started?Download WordPress

Codex

Template Tags/the excerpt rss

Contents

Description

Displays the excerpt of the current post formatted for RSS.If you do not provide an explicit excerpt to a post (in the post editor's optional excerpt field), the first 55 words of the post's content are used. This tag must be within The_Loop.

Usage

 <?php the_excerpt_rss(); ?> 

Parameters

This tag has no parameters.

Note: See Parameters for v1.2 for arguments available in that version.

Example

Displays the post's excerpt, or the first 120 words of the post's content when no excerpt exists, formatted for RSS syndication.

<description><?php the_excerpt_rss(); ?></description> 

Version 1.2

WordPress version 1.5 does not support parameters for this tag. The following information is retained for the benefit of 1.2 users.

v1.2 Usage

 <?php the_excerpt_rss$cut$encode_html ); ?> 

v1.2 Parameters

$cut 
(integer) Number of words to display before ending the excerpt. Can be any numeric value up to the default.
$encode_html 
(integer) Defines html tag filtering and special character (e.g. '&') encoding. Options are:
  • 0 - (Default) Parses out links for numbered "url footnotes".
  • 1 - Filters through the PHP function htmlspecialchars(), but also sets cut to 0, so is not recommended when using the cut parameter.
  • 2 - Strips html tags, and replaces '&' with HTML entity equivalent (&amp;). This is the default when using the cut parameter.

Related

See also index of Function Reference and index of Template Tags.