WordPress 中文文档
Template Tags/the excerpt rss
出自WordPress Chinese 中文文档
wordpress.org.cn
目录 |
Description
Displays the excerpt of the current post formatted for RSS.If you do not provide an explicit excerpt to a post (in the post editor's optional excerpt field), the first 55 words of the post's content are used. This tag must be within The_Loop.
Usage
%%% ?php the_excerpt_rss(); ? %%%
Parameters
This tag has no parameters.
Note: See Parameters for v1.2 for arguments available in that version.
Example
Displays the post's excerpt, or the first 120 words of the post's content when no excerpt exists, formatted for RSS syndication.
description?php the_excerpt_rss(); ?/description
Version 1.2
WordPress version 1.5 does not support parameters for this tag. The following information is retained for the benefit of 1.2 users.
v1.2 Usage
%%% ?php the_excerpt_rss( $cut, $encode_html ); ? %%%
v1.2 Parameters
- $cut
- (integer) Number of words to display before ending the excerpt. Can be any numeric value up to the default.
- $encode_html
- (integer) Defines html tag filtering and special character (e.g. ) encoding. Options are:
- tt0/tt - (Default) Parses out links for numbered url footnotes.
- tt1/tt - Filters through the PHP function htmlspecialchars(), but also sets cut to tt0/tt, so is not recommended when using the cut parameter.
- tt2/tt - Strips html tags, and replaces with HTML entity equivalent (amp;amp;). This is the default when using the cut parameter.
Related
body_class, next_image_link, next_post_link, next_posts_link, post_class, post_password_required, posts_nav_link, previous_image_link, previous_post_link, previous_posts_link, single_post_title, sticky_class, the_category, the_category_rss, the_content, the_content_rss, the_excerpt, the_excerpt_rss, the_ID, the_meta, the_shortlink, the_tags, the_title, the_title_attribute, the_title_rss, wp_link_pages
includeonlydiv style=clear:both; background-color:#F7F7F7; border:1px solid #CCCCCC; color:#000000; padding:7px; margin:0.5em auto 0.5em auto; vertical-align:middle;See also index of Function Reference and index of Template Tags./div/includeonlynoinclude
Description
This Template is used by Codex:Template Messages.
Usage
pre 已侦测回归模板: Template:Message /pre
Result
已侦测回归模板: Template:Message
/noinclude

