WordPress:Template Tags/the excerpt rss

来自站长百科
跳转至: 导航、​ 搜索

描述[ ]

显示当前文章的摘录,为RSS格式。如果你的确提供了一篇清晰明了的文章摘录(在文章编辑器的可选择的摘录区),标签会显示teaser,使用了文章内容的前55个字。必须在The_Loop内使用这个标签。

要更好地控制结果,请看看the_content_rss()

用法[ ]

%%% <?php the_excerpt_rss(); ?> %%%

请看看 1.2版本的参数,关于1.2版本拥有的参数。

例子[ ]

显示文章的摘录,或者不存在摘录的时候,显示文章内容的前120个单词,格式为RSS syndication。

<description><?php the_excerpt_rss(); ?></description>

参数[ ]

这个标签没有参数。

1.2版本的参数[ ]

WordPress1.5版本不提供这个标签的参数。下面的信息是为1.2版本的用户,保留的。

用法: %%% <?php the_excerpt_rss(cut, encode_html); ?> %%%

参数:

cut
(integer) 在结束摘录之前,需要显示的字数。可以是等于默认值的任何数值。
encode_html
(integer) 定义html标签过滤和特殊的字符(例如. '&')编码。选项是:
  • 0 - (默认)为有限的 "url footnotes"Parses out链接。
  • 1 - 过滤PHP 函数htmlspecialchars(),但是同时set cut to 0,这样使用cut参数时,不会推荐。
  • 2 - 剥除html标签,并且将'&'替换为HTML等同实体(&amp;)。使用切断参数时,这是默认的。

相关的[ ]

the_ID, the_title, the_title_attribute, single_post_title, the_title_rss, the_content, the_content_rss, the_excerpt, the_excerpt_rss, previous_post_link, next_post_link, posts_nav_link, the_meta,

模板:没有Param标签页底文字