Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Template Tags/the excerpt rss


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.


 <?php the_excerpt_rss(); ?> 


This tag has no parameters.

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


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

(integer) Number of words to display before ending the excerpt. Can be any numeric value up to the default.
(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.


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