Template Tags/the content rss

Материал из WordPress Wiki

Перейти к: навигация, поиск

Содержание

Description

Displays the content of the current post formatted for RSS. This tag must be within The_Loop.

This tag will display a "teaser" link to read more of a post, when on non-single/non-permalink post pages and the <!--more--> Quicktag is used.

Usage

%%% <?php the_content_rss('more_link_text', strip_teaser,

                     'more_file', cut, encode_html); ?> %%%

Examples

Default Usage

Displays the content in RSS format using defaults.

 <?php the_content_rss(); ?>

Hides Teaser Link and Limits Content

Displays the content in RSS format, hides the teaser link and cuts the content after 50 words.

 <?php the_content_rss('', TRUE, '', 50); ?>

Parameters

more_link_text 
(string) Link text to display for the "more" link. Defaults to '(more...)'.
strip_teaser 
(boolean) Should the text before the "more" link be hidden (TRUE) or displayed (FALSE). Defaults to FALSE.
more_file 
(string) File which the "more" link points to. Defaults to the current file.
cut 
(integer) Number of words displayed before ending content. Default is 0 (display all).
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

Шаблон:Tag Post Tags

Шаблон:PHP Function Tag Footer

Личные инструменты
Реклама

телевизор sharp lc-20d1ru