WordPress输出RSS文章内容标签:the_content_rss

WordPress模板标签the_content_rss用于输出RSS格式化的文章内容,需要用在The Loop循环里。该函数已经废弃,可能会在未来的WordPress版本中删除,不建议使用。

the_content_rss( string $more_link_text='(more...)', boolean $stripteaser=0, string $more_file='', integer $cut = 0, integer $encode_html = 0)

函数参数

$more_link_text

字符串值,默认值:(more…)

More链接的文本

$strip_teaser

布尔值,默认值:false

为true时,点击More链接到达文章页面会隐藏More链接前的文本,文章里要在添加<!–more–>标签的同时添加<!–noteaser–>标签。

$more_file

字符串值,默认为空

More链接指向的文件

$cut

整数型,默认值:0,表示所有

结束内容前显示的字符

$encode_html

整数型,默认值:0

  • 0:解析编号为url footnotes的链接;
  • 1:使用htmlspecialchars()函数转义字符;
  • 2:标记HTML标签,并将“&”替换为HTML实体;

使用示例:

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

扩展阅读

the_content_rss()函数位于:wp-includes/deprecated.php

相关函数:

阿里云