WordPress 中文文档
Template Tags
出自WordPress Chinese 中文文档
wordpress.org.cn
Template tags are used within your blog's Templates to display information dynamically or otherwise customize your blog, providing the tools to make it as individual and interesting as you are. Below is a list of the general user tags available in WordPress, sorted by function-specific category.
For further information on template tags and templates in general, see the following:
- Stepping Into Template Tags - an introduction to Template Tags.
- Anatomy of a Template Tag - details of how to put Tags into Template files.
- How to Pass Tag Parameters - details of how to use Parameters with Tags.
- Include Tags - additional tags related to including one Template file within another.
- Conditional Tags - additional tags, not shown here, related to making your Templates more flexible with options.
- Function Reference - additional tags related to core WordPress functionality.
- Deprecated Functions - additional tags that are Deprecated.
- Templates - a comprehensive list of Template, Theme, and Tag resources.
- Stepping Into Templates - introduction to Template files.
Note: If you have an interesting twist on the implementation of a template tag, you're encouraged to add to its documentation for the benefit of other WordPress users. However, first see Contributing to WordPress and Codex:Contributing for help and guidelines on editing Codex pages.
Tags
Source Code
!-- 3.0:
- onlyincludecodewp-includes/author-template.php/code/onlyinclude
div class=template-description style=padding: 0 1.5em; border: 1px solid #eeeeee; background-color: #f9f9f9
Template Description
Link to the source code on http://core.trac.wordpress.org/browser/.
Parameters
- filename
- (option) path to tag (version) or trunk. This option is only used for a new function.br /Default: codetags/nowiki{{/nowikiCurrentVersionnowiki}}/nowiki/code (the latest stable version of WordPress)
- codetrunk/code -- trunk is the latest bleeding edge development version of WordPress.
Usage
Link to the stable version: preTemplate:BrowseSource/pre
Link to trunk: preTemplate:BrowseSource/pre
/div
wordpress.org.cn
- onlyincludecodewp-includes/bookmark-template.php/code/onlyinclude
div class=template-description style=padding: 0 1.5em; border: 1px solid #eeeeee; background-color: #f9f9f9
Template Description
Link to the source code on http://core.trac.wordpress.org/browser/.
Parameters
- filename
- (option) path to tag (version) or trunk. This option is only used for a new function.br /Default: codetags/nowiki{{/nowikiCurrentVersionnowiki}}/nowiki/code (the latest stable version of WordPress)
- codetrunk/code -- trunk is the latest bleeding edge development version of WordPress.
Usage
Link to the stable version: preTemplate:BrowseSource/pre
Link to trunk: preTemplate:BrowseSource/pre
/div
wordpress.org.cn
- onlyincludecodewp-includes/category-template.php/code/onlyinclude
div class=template-description style=padding: 0 1.5em; border: 1px solid #eeeeee; background-color: #f9f9f9
Template Description
Link to the source code on http://core.trac.wordpress.org/browser/.
Parameters
- filename
- (option) path to tag (version) or trunk. This option is only used for a new function.br /Default: codetags/nowiki{{/nowikiCurrentVersionnowiki}}/nowiki/code (the latest stable version of WordPress)
- codetrunk/code -- trunk is the latest bleeding edge development version of WordPress.
Usage
Link to the stable version: preTemplate:BrowseSource/pre
Link to trunk: preTemplate:BrowseSource/pre
/div
wordpress.org.cn
- onlyincludecodewp-includes/comment-template.php/code/onlyinclude
div class=template-description style=padding: 0 1.5em; border: 1px solid #eeeeee; background-color: #f9f9f9
Template Description
Link to the source code on http://core.trac.wordpress.org/browser/.
Parameters
- filename
- (option) path to tag (version) or trunk. This option is only used for a new function.br /Default: codetags/nowiki{{/nowikiCurrentVersionnowiki}}/nowiki/code (the latest stable version of WordPress)
- codetrunk/code -- trunk is the latest bleeding edge development version of WordPress.
Usage
Link to the stable version: preTemplate:BrowseSource/pre
Link to trunk: preTemplate:BrowseSource/pre
/div
wordpress.org.cn
- onlyincludecodewp-includes/general-template.php/code/onlyinclude
div class=template-description style=padding: 0 1.5em; border: 1px solid #eeeeee; background-color: #f9f9f9
Template Description
Link to the source code on http://core.trac.wordpress.org/browser/.
Parameters
- filename
- (option) path to tag (version) or trunk. This option is only used for a new function.br /Default: codetags/nowiki{{/nowikiCurrentVersionnowiki}}/nowiki/code (the latest stable version of WordPress)
- codetrunk/code -- trunk is the latest bleeding edge development version of WordPress.
Usage
Link to the stable version: preTemplate:BrowseSource/pre
Link to trunk: preTemplate:BrowseSource/pre
/div
wordpress.org.cn
- onlyincludecodewp-includes/link-template.php/code/onlyinclude
div class=template-description style=padding: 0 1.5em; border: 1px solid #eeeeee; background-color: #f9f9f9
Template Description
Link to the source code on http://core.trac.wordpress.org/browser/.
Parameters
- filename
- (option) path to tag (version) or trunk. This option is only used for a new function.br /Default: codetags/nowiki{{/nowikiCurrentVersionnowiki}}/nowiki/code (the latest stable version of WordPress)
- codetrunk/code -- trunk is the latest bleeding edge development version of WordPress.
Usage
Link to the stable version: preTemplate:BrowseSource/pre
Link to trunk: preTemplate:BrowseSource/pre
/div
wordpress.org.cn
- onlyincludecodewp-includes/post-template.php/code/onlyinclude
div class=template-description style=padding: 0 1.5em; border: 1px solid #eeeeee; background-color: #f9f9f9
Template Description
Link to the source code on http://core.trac.wordpress.org/browser/.
Parameters
- filename
- (option) path to tag (version) or trunk. This option is only used for a new function.br /Default: codetags/nowiki{{/nowikiCurrentVersionnowiki}}/nowiki/code (the latest stable version of WordPress)
- codetrunk/code -- trunk is the latest bleeding edge development version of WordPress.
Usage
Link to the stable version: preTemplate:BrowseSource/pre
Link to trunk: preTemplate:BrowseSource/pre
/div
wordpress.org.cn
- onlyincludecodewp-includes/post-thumbnail-template.php/code/onlyinclude
div class=template-description style=padding: 0 1.5em; border: 1px solid #eeeeee; background-color: #f9f9f9
Template Description
Link to the source code on http://core.trac.wordpress.org/browser/.
Parameters
- filename
- (option) path to tag (version) or trunk. This option is only used for a new function.br /Default: codetags/nowiki{{/nowikiCurrentVersionnowiki}}/nowiki/code (the latest stable version of WordPress)
- codetrunk/code -- trunk is the latest bleeding edge development version of WordPress.
Usage
Link to the stable version: preTemplate:BrowseSource/pre
Link to trunk: preTemplate:BrowseSource/pre
/div
wordpress.org.cn --
trunk (the latest development code):
- onlyincludecodewp-includes/author-template.php/code/onlyinclude
div class=template-description style=padding: 0 1.5em; border: 1px solid #eeeeee; background-color: #f9f9f9
Template Description
Link to the source code on http://core.trac.wordpress.org/browser/.
Parameters
- filename
- (option) path to tag (version) or trunk. This option is only used for a new function.br /Default: codetags/nowiki{{/nowikiCurrentVersionnowiki}}/nowiki/code (the latest stable version of WordPress)
- codetrunk/code -- trunk is the latest bleeding edge development version of WordPress.
Usage
Link to the stable version: preTemplate:BrowseSource/pre
Link to trunk: preTemplate:BrowseSource/pre
/div
wordpress.org.cn
- onlyincludecodewp-includes/bookmark-template.php/code/onlyinclude
div class=template-description style=padding: 0 1.5em; border: 1px solid #eeeeee; background-color: #f9f9f9
Template Description
Link to the source code on http://core.trac.wordpress.org/browser/.
Parameters
- filename
- (option) path to tag (version) or trunk. This option is only used for a new function.br /Default: codetags/nowiki{{/nowikiCurrentVersionnowiki}}/nowiki/code (the latest stable version of WordPress)
- codetrunk/code -- trunk is the latest bleeding edge development version of WordPress.
Usage
Link to the stable version: preTemplate:BrowseSource/pre
Link to trunk: preTemplate:BrowseSource/pre
/div
wordpress.org.cn
- onlyincludecodewp-includes/category-template.php/code/onlyinclude
div class=template-description style=padding: 0 1.5em; border: 1px solid #eeeeee; background-color: #f9f9f9
Template Description
Link to the source code on http://core.trac.wordpress.org/browser/.
Parameters
- filename
- (option) path to tag (version) or trunk. This option is only used for a new function.br /Default: codetags/nowiki{{/nowikiCurrentVersionnowiki}}/nowiki/code (the latest stable version of WordPress)
- codetrunk/code -- trunk is the latest bleeding edge development version of WordPress.
Usage
Link to the stable version: preTemplate:BrowseSource/pre
Link to trunk: preTemplate:BrowseSource/pre
/div
wordpress.org.cn
- onlyincludecodewp-includes/comment-template.php/code/onlyinclude
div class=template-description style=padding: 0 1.5em; border: 1px solid #eeeeee; background-color: #f9f9f9
Template Description
Link to the source code on http://core.trac.wordpress.org/browser/.
Parameters
- filename
- (option) path to tag (version) or trunk. This option is only used for a new function.br /Default: codetags/nowiki{{/nowikiCurrentVersionnowiki}}/nowiki/code (the latest stable version of WordPress)
- codetrunk/code -- trunk is the latest bleeding edge development version of WordPress.
Usage
Link to the stable version: preTemplate:BrowseSource/pre
Link to trunk: preTemplate:BrowseSource/pre
/div
wordpress.org.cn
- onlyincludecodewp-includes/general-template.php/code/onlyinclude
div class=template-description style=padding: 0 1.5em; border: 1px solid #eeeeee; background-color: #f9f9f9
Template Description
Link to the source code on http://core.trac.wordpress.org/browser/.
Parameters
- filename
- (option) path to tag (version) or trunk. This option is only used for a new function.br /Default: codetags/nowiki{{/nowikiCurrentVersionnowiki}}/nowiki/code (the latest stable version of WordPress)
- codetrunk/code -- trunk is the latest bleeding edge development version of WordPress.
Usage
Link to the stable version: preTemplate:BrowseSource/pre
Link to trunk: preTemplate:BrowseSource/pre
/div
wordpress.org.cn
- onlyincludecodewp-includes/link-template.php/code/onlyinclude
div class=template-description style=padding: 0 1.5em; border: 1px solid #eeeeee; background-color: #f9f9f9
Template Description
Link to the source code on http://core.trac.wordpress.org/browser/.
Parameters
- filename
- (option) path to tag (version) or trunk. This option is only used for a new function.br /Default: codetags/nowiki{{/nowikiCurrentVersionnowiki}}/nowiki/code (the latest stable version of WordPress)
- codetrunk/code -- trunk is the latest bleeding edge development version of WordPress.
Usage
Link to the stable version: preTemplate:BrowseSource/pre
Link to trunk: preTemplate:BrowseSource/pre
/div
wordpress.org.cn
- onlyincludecodewp-includes/nav-menu-template.php/code/onlyinclude
div class=template-description style=padding: 0 1.5em; border: 1px solid #eeeeee; background-color: #f9f9f9
Template Description
Link to the source code on http://core.trac.wordpress.org/browser/.
Parameters
- filename
- (option) path to tag (version) or trunk. This option is only used for a new function.br /Default: codetags/nowiki{{/nowikiCurrentVersionnowiki}}/nowiki/code (the latest stable version of WordPress)
- codetrunk/code -- trunk is the latest bleeding edge development version of WordPress.
Usage
Link to the stable version: preTemplate:BrowseSource/pre
Link to trunk: preTemplate:BrowseSource/pre
/div
wordpress.org.cn
- onlyincludecodewp-includes/post-template.php/code/onlyinclude
div class=template-description style=padding: 0 1.5em; border: 1px solid #eeeeee; background-color: #f9f9f9
Template Description
Link to the source code on http://core.trac.wordpress.org/browser/.
Parameters
- filename
- (option) path to tag (version) or trunk. This option is only used for a new function.br /Default: codetags/nowiki{{/nowikiCurrentVersionnowiki}}/nowiki/code (the latest stable version of WordPress)
- codetrunk/code -- trunk is the latest bleeding edge development version of WordPress.
Usage
Link to the stable version: preTemplate:BrowseSource/pre
Link to trunk: preTemplate:BrowseSource/pre
/div
wordpress.org.cn
- onlyincludecodewp-includes/post-thumbnail-template.php/code/onlyinclude
div class=template-description style=padding: 0 1.5em; border: 1px solid #eeeeee; background-color: #f9f9f9
Template Description
Link to the source code on http://core.trac.wordpress.org/browser/.
Parameters
- filename
- (option) path to tag (version) or trunk. This option is only used for a new function.br /Default: codetags/nowiki{{/nowikiCurrentVersionnowiki}}/nowiki/code (the latest stable version of WordPress)
- codetrunk/code -- trunk is the latest bleeding edge development version of WordPress.
Usage
Link to the stable version: preTemplate:BrowseSource/pre
Link to trunk: preTemplate:BrowseSource/pre
/div
wordpress.org.cn

