WordPress:Template Tags/the excerpt rss
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 WordPress:The_Loop.
For finer control over output, see the_content_rss().
Usage
%%% <?php the_excerpt_rss(); ?> %%%
See [[WordPress:#Parameters for 1.2|Parameters for 1.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>
Parameters
This tag has no parameters.
Parameters for 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.
Usage: %%% <?php the_excerpt_rss(cut, encode_html); ?> %%%
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 (&). This is the default when using the cut parameter.