WordPress.org

Ready to get started?Download WordPress

Codex

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

Function Reference/the content rss


This function has been deprecated. That means it has been replaced by a new function or is no longer supported, and may be removed from future versions. All code that uses this function should be converted to use its replacement if one exists. See also wp-includes/deprecated.php. Use the_content_feed instead.

Description

Display the post content for the feed.

For encoding the html or the $encode_html parameter, there are three possible values. '0' will make urls footnotes and use make_url_footnote(). '1' will encode special characters and automatically display all of the content. The value of '2' will strip all HTML tags from the content.

Also note that you cannot set the amount of words and not set the html encoding. If that is the case, then the html encoding will default to 2, which will strip all HTML tags.

To restrict the amount of words of the content, you can use the cut parameter. If the content is less than the amount, then there won't be any dots added to the end. If there is content left over, then dots will be added and the rest of the content will be removed.

Usage

<?php the_content_rss$more_link_text$stripteaser$more_file$cut$encode_html ?>

Parameters

$more_link_text
(string) (optional) Text to display when more content is available but not displayed.
Default: 'more...'
$stripteaser
(integer|boolean) (optional) Default is 0.
Default: 0
$more_file
(string) (optional) Optional.
Default: ''
$cut
(integer) (optional) Amount of words to keep for the content.
Default: 0
$encode_html
(integer) (optional) How to encode the content.
Default: 0

Return Values

(void) 
This function does not return a value.

Examples

Notes

  • See get_the_content() For the $more_link_text, $stripteaser, and $more_file parameters.
  • Uses: apply_filters() Calls 'the_content_rss' on the content before processing.

Change Log

Since: 0.71

Source File

the_content_rss() is located in wp-includes/feed.php.

Related

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