the_content_rss

Sponsored Link

RSSにフォーマットした現在のページのコンテンツを表示します。 このタグは、The_Loop内にする必要があります。

このタグは、non-single/non-permalinkの投稿ページで

Sponsored Link

クイックタグを使用した時に、投稿の詳細を読むリンクへの”teaser”が表示されるでしょう。

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 Quicktag is used.

この関数は廃止されました。それはそれは新しい関数に置き換えられているか、もはやサポートされ、意味、将来のバージョンから削除されることがあります。 1 つが存在する場合、この関数を、その交換を使用して変換する必要が使用するすべてのコードです。また、wp-includes/deprecated.php参照してください。

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.

the_content_rssのテンプレートタグ使用方法

<?php the_content_rss('more_link_text', strip_teaser,
  'more_file', cut, encode_html); ?>

デフォルトの使い方

デフォルトを使用することでRSS形式における内容を表示します。

Displays the content in RSS format using defaults.

<?php the_content_rss(); ?>

簡単な先行宣伝へのリンクを非表示にしてとコンテンツを制限する方法

RSS形式のコンテンツを表示して、50単語後のコンテンツをカットして簡単な先行宣伝を非表示にします。

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

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

the_content_rssのパラメーター

more_link_text

(string) “more”のリンクにリンクテキストを表示します。デフォルトは'(more…)’.

(string) Link text to display for the “more” link. Defaults to ‘(more…)’.

strip_teaser

(boolean) “more”リンクの前のテキストを非表示(TRUE)にするか表示にするか(FALSE)を表示するかです。デフォルトはFALSEです。

(boolean) Should the text before the “more” link be hidden (TRUE) or displayed (FALSE). Defaults to FALSE.

more_file

(string) “more”のリンクポイントにファイル。デフォルトは現在のファイル。

(string) File which the “more” link points to. Defaults to the current file.

cut

(integer) 内容を終了する前に表示した数字の単語です。デフォルトは0(すべてを表示)。

(integer) Number of words displayed before ending content. Default is 0 (display all).

encode_html

(integer)デフォルトのHTMLタグはフィルタリングして、特殊文字(例:’&’)のエンコーディングをします。オプションがあります:

(integer) Defines html tag filtering and special character (e.g. ‘&’) encoding. Options are:

  • 0 – (デフォルト)”URLの脚注”の番号に外部リンクを解析します 。
  • 1 – PHP関数のhtmlspecialchars()を通じてフィルタだけでなく、0にカットしてセットされるので、カットパラメーターを使用する時は推奨されません。
  • 2 – Strips HTMLタグは、HTMLエンティティと同等の’&’に置き換えられます(&)。これはカットパラメーターを使用している時のデフォルトです。
  • 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.

変更ログ

  • Since: 0.71
  • Deprecated: 2.9.0

関連テンプレートタグ

the_ID, the_title, the_title_attribute, single_post_title, the_title_rss, the_content, the_content_rss, the_excerpt, the_excerpt_rss, wp_link_pages, next_post_link, next_posts_link, previous_post_link, previous_posts_link, posts_nav_link, sticky_class, the_meta

Sponsored Link