WordPress 中文文档

Template Tags/bloginfo rss

出自WordPress Chinese 中文文档

跳转到: 导航, 搜索

wordpress.org.cn

目录

Description

Displays information about your blog, mostly gathered from the information you supply in Users Your Profile and General Options from the WordPress Administration Panels. This function is identical to bloginfo() except it strips any markup from the output for use in WordPress' syndication feeds.

Usage

%%% ?php bloginfo_rss('show'); ? %%%

Example

Show Blog Title and Link

Displays blog name and url in title and link tags of RSS feed.

lt;titlegt;?php bloginfo_rss('name'); ?lt;/titlegt;
lt;linkgt;?php bloginfo_rss('url') ?lt;/linkgt;

Parameters

show 
(string) Informational detail about your blog. Valid values:
  • tt'name'/tt - Weblog title; set in General Options. (Default)
  • tt'description'/tt - Tagline for your blog; set in General Options.
  • tt'url'/tt - URL for your blog's web site address.
  • tt'rdf_url'/tt - URL for RDF/RSS 1.0 feed.
  • tt'rss_url'/tt - URL for RSS 0.92 feed.
  • tt'rss2_url'/tt - URL for RSS 2.0 feed.
  • tt'atom_url'/tt - URL for Atom feed.
  • tt'comments_rss2_url'/tt - URL for comments RSS 2.0 feed.
  • tt'pingback_url'/tt - URL for Pingback (XML-RPC file).
  • tt'admin_email'/tt - Administrator's email address; set in General Options.
  • tt'charset'/tt - Character encoding for your blog; set in Reading Options.
  • tt'version'/tt - Version of WordPress your blog uses.
The following work in WordPress version 1.5 or after:
  • tt'html_type'/tt - Content-type for your blog.
  • tt'wpurl'/tt - URL for WordPress installation.
  • tt'template_url'/tt - URL for template in use.
  • tt'template_directory'/tt - URL for template's directory.
  • tt'stylesheet_url'/tt - URL for primary CSS file.
  • tt'stylesheet_directory'/tt - URL for stylesheet directory.

Related

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

wordpress