WordPress: Template Tags:修订间差异

来自站长百科
跳转至: 导航、​ 搜索
(新页面: __TOC__ Template tags are used within your blog's WordPress:Templates to display information dynamically or otherwise customize your blog, providing the tools to make it as individual...)
 
 
(未显示4个用户的14个中间版本)
第1行: 第1行:
<span style="border:1px solid #000; text-align:center; float:right; padding:6px;"><strong>导航:</strong> [[WordPress:WordPress文档|上一级]] | [[WordPress]] | {{Template:WordPress导航}}</span>
<div style="clear:both;"></div>
__TOC__
__TOC__
Template tags are used within your blog's [[WordPress: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.<br />
模板标签是用在你的blog中的 [[WordPress:Templates|模板]]中,显示动态信息或者自定义你的blog,它提供的独立有趣的工具。下面是WordPress中一般用户使用的标签列表,按照功能分类。<br />


For further information on template tags and templates in general, see the following:
更多关于模板标签的信息, 参见如下内容:
* [[WordPress:Stepping Into Template Tags]] (an introduction to Template Tags)
* [[WordPress:Stepping Into Template Tags|走进模板标签]] (模板标签的介绍)
* [[WordPress:Template Tags/Anatomy of a Template Tag|Anatomy of a Template Tag]] (details of how to put Tags into Template files)
* [[WordPress:Template Tags/Anatomy of a Template Tag|模板标签解析]] (如何添加标签到模板文件中的细节介绍)
* [[WordPress:Template Tags/How to Pass Tag Parameters|How to Pass Tag Parameters]] (details of how to use Parameters with Tags)
* [[WordPress:Template Tags/How to Pass Tag Parameters|如何传递标签参数]] (如何使用标签的参数的详细内容)
* [[WordPress:Include Tags]] (additional tags not shown here, related to including one Template file within another)
* [[WordPress:Include Tags|包括标签]] (附加的标签没有在这里显示, 涉及到把一个模板文件纳入到另一模板文件中)
* [[WordPress:Conditional Tags]] (more additional tags not shown here, related to making your Templates more flexible with options)
* [[WordPress:Conditional Tags|条件式标签]] (更多条件式标签没有显示在这里,涉及到让你的模板操作更灵活)
* [[WordPress:Templates]] (a comprehensive list of Template, Theme, and Tag resources)
* [[WordPress:Templates|模板]] (全面的模板、主题和标签资源列表)
* [[WordPress:Stepping Into Templates]] (introduction to Template files)
* [[WordPress:Stepping Into Templates|走进模板]] (模板文件介绍)


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 [[WordPress:Contributing to WordPress]] for help and guidelines on editing Codex pages.
如果你有什么有趣的关于模板标签的运行的想法,我们鼓励你添加到它的文件中,这样对WordPress其他用户有一定的好处。尽管如此,首先查看 [[WordPress:Contributing to WordPress|为WordPress做贡献]]获得编辑Codex页面的帮助和指导。


'''Note:''' Some template tags listed below are new to a specific version of WordPress and will be so noted (example: "Version 2.1"). This means that tag is not available in previous versions. Tags listed as "Deprecated" have been so from version 2.0 or earlier. ''Newer'' deprecated tags are marked with the version from when they were deprecated (i.e. "Deprecated in 2.1")
'''注意:''' 下边的一些模板标签列表是一些针对WordPress更新的,将会标注出来(: " 2.1版") 这意味着在旧版本中这种标签不可用。列出的标签从版本2.0或稍早一些的版本后已经 "不可用"了 。''更新的'' 不可用的标签会使用版本号标记出从哪个版本开始不可用("Deprecated in 2.1")


{| cellspacing="10" width="100%"
{| cellspacing="10" width="100%"
|- valign="top"
|- valign="top"
|bgcolor="#fbfbef" style="border:1px solid #ffc9c9;padding:1em;padding-top:0.5em; color: black;" width="50%"|
|bgcolor="#fbfbef" style="border:1px solid #ffc9c9;padding:1em;padding-top:0.5em; color: black;" width="50%"|
== Author tags ==
== 作者标签 ==


* [[WordPress:Template_Tags/the_author | the_author]]
* [[WordPress:Template_Tags/the_author | the_author]]
第30行: 第32行:
* [[WordPress:Template_Tags/the_author_url | the_author_url]]
* [[WordPress:Template_Tags/the_author_url | the_author_url]]
* [[WordPress:Template_Tags/the_author_link | the_author_link]] (Version 2.1)
* [[WordPress:Template_Tags/the_author_link | the_author_link]] (Version 2.1)
* [[WordPress:Template_Tags/the_author_icq | the_author_icq]] (Deprecated)
* <s>[[WordPress:Template_Tags/the_author_icq | the_author_icq]]</s> (Deprecated)
* [[WordPress:Template_Tags/the_author_aim | the_author_aim]]
* [[WordPress:Template_Tags/the_author_aim | the_author_aim]]
* [[WordPress:Template_Tags/the_author_yim | the_author_yim]]
* [[WordPress:Template_Tags/the_author_yim | the_author_yim]]
* [[WordPress:Template_Tags/the_author_msn | the_author_msn]] (Deprecated)
* <s>[[WordPress:Template_Tags/the_author_msn | the_author_msn]]</s> (Deprecated)
* [[WordPress:Template_Tags/the_author_posts | the_author_posts]]
* [[WordPress:Template_Tags/the_author_posts | the_author_posts]]
* [[WordPress:Template_Tags/the_author_posts_link | the_author_posts_link]]
* [[WordPress:Template_Tags/the_author_posts_link | the_author_posts_link]]
* [[WordPress:Template_Tags/list_authors | list_authors]] (Deprecated)
* <s>[[WordPress:Template_Tags/list_authors | list_authors]]</s> (Deprecated)
* [[WordPress:Template_Tags/wp_list_authors | wp_list_authors]]
* [[WordPress:Template_Tags/wp_list_authors | wp_list_authors]]


|valign="top" bgcolor="#f0f0ff" style="border:1px solid #c6c9ff;padding:1em;padding-top:0.5em; color: black;" width="50%"|
|valign="top" bgcolor="#f0f0ff" style="border:1px solid #c6c9ff;padding:1em;padding-top:0.5em; color: black;" width="50%"|


== Category tags ==
== 分类标签 ==


* [[WordPress:Template_Tags/the_category | the_category]]
* [[WordPress:Template_Tags/the_category | the_category]]
* [[WordPress:Template_Tags/the_category_rss | the_category_rss]]
* [[WordPress:Template_Tags/the_category_rss | the_category_rss]]
* [[WordPress:Template_Tags/the_category_ID | the_category_ID]] (Deprecated)
* <s>[[WordPress:Template_Tags/the_category_ID | the_category_ID]]</s> (Deprecated)
* [[WordPress:Template_Tags/the_category_head | the_category_head]] (Deprecated)
* <s>[[WordPress:Template_Tags/the_category_head | the_category_head]]</s> (Deprecated)
* [[WordPress:Template_Tags/single_cat_title | single_cat_title]]
* [[WordPress:Template_Tags/single_cat_title | single_cat_title]]
* [[WordPress:Template_Tags/category_description | category_description]]
* [[WordPress:Template_Tags/category_description | category_description]]
* [[WordPress:Template_Tags/wp_dropdown_categories | wp_dropdown_categories]] (Version 2.1)
* [[WordPress:Template_Tags/wp_dropdown_categories | wp_dropdown_categories]] (Version 2.1)
* [[WordPress:Template_Tags/dropdown_cats | dropdown_cats]] (Deprecated in 2.1)
* <s>[[WordPress:Template_Tags/dropdown_cats | dropdown_cats]]</s> (Deprecated in 2.1)
* [[WordPress:Template_Tags/wp_list_categories | wp_list_categories]] (Version 2.1)
* [[WordPress:Template_Tags/wp_list_categories | wp_list_categories]] (Version 2.1)
* [[WordPress:Template_Tags/list_cats | list_cats]] (Deprecated in 2.1)
* <s>[[WordPress:Template_Tags/list_cats | list_cats]]</s> (Deprecated in 2.1)
* [[WordPress:Template_Tags/wp_list_cats | wp_list_cats]] (Deprecated in 2.1)
* <s>[[WordPress:Template_Tags/wp_list_cats | wp_list_cats]]</s> (Deprecated in 2.1)
* [[WordPress:Template_Tags/in_category | in_category]]
* [[WordPress:Template_Tags/in_category | in_category]]
* [[WordPress:Template_Tags/get_category_parents | get_category_parents]]
* [[WordPress:Template_Tags/get_category_parents | get_category_parents]]
* [[WordPress:Template_Tags/get_the_category | get_the_category]]
* [[WordPress:Template_Tags/get_the_category | get_the_category]]
* [[WordPress:Function_Reference/get_category_link | get_category_link]]


|- valign="top"
|- valign="top"
|bgcolor="#fbfbef" style="border:1px solid #ffc9c9;padding:1em;padding-top:0.5em; color: black;" width="50%"|
|bgcolor="#fbfbef" style="border:1px solid #ffc9c9;padding:1em;padding-top:0.5em; color: black;" width="50%"|


== Comment tags ==
== 评论标签 ==


* [[WordPress:Template_Tags/comments_number | comments_number]]
* [[WordPress:Template_Tags/comments_number | comments_number]]
第87行: 第90行:


|valign="top" bgcolor="#f0f0ff" style="border:1px solid #c6c9ff;padding:1em;padding-top:0.5em; color: black;" width="50%"|
|valign="top" bgcolor="#f0f0ff" style="border:1px solid #c6c9ff;padding:1em;padding-top:0.5em; color: black;" width="50%"|
== Date and Time tags ==
 
== 日期和时间标签 ==


* [[WordPress:Template_Tags/the_date_xml | the_date_xml]]
* [[WordPress:Template_Tags/the_date_xml | the_date_xml]]
第97行: 第101行:
* [[WordPress:Template_Tags/single_month_title | single_month_title]]
* [[WordPress:Template_Tags/single_month_title | single_month_title]]
* [[WordPress:Template_Tags/get_calendar | get_calendar]]
* [[WordPress:Template_Tags/get_calendar | get_calendar]]
* [[WordPress:Template_Tags/the_weekday | the_weekday]]  
* <s>[[WordPress:Template_Tags/the_weekday | the_weekday]]</s> (Deprecated)
* [[WordPress:Template_Tags/the_weekday_date | the_weekday_date]]  
* <s>[[WordPress:Template_Tags/the_weekday_date | the_weekday_date]]</s> (Deprecated)


|- valign="top"
|- valign="top"
|bgcolor="#fbfbef" style="border:1px solid #ffc9c9;padding:1em;padding-top:0.5em; color: black;" width="50%"|
|bgcolor="#fbfbef" style="border:1px solid #ffc9c9;padding:1em;padding-top:0.5em; color: black;" width="50%"|


== General tags ==
== 一般标签 ==


* [[WordPress:Template_Tags/bloginfo | bloginfo]]
* [[WordPress:Template_Tags/bloginfo | bloginfo]]
第111行: 第115行:
* [[WordPress:Template_Tags/wp_title | wp_title]]
* [[WordPress:Template_Tags/wp_title | wp_title]]
* [[WordPress:Template_Tags/wp_get_archives | wp_get_archives]]
* [[WordPress:Template_Tags/wp_get_archives | wp_get_archives]]
* [[WordPress:Template_Tags/get_archives | get_archives]] (Deprecated in 2.1)
* <s>[[WordPress:Template_Tags/get_archives | get_archives]]</s> (Deprecated in 2.1)
* [[WordPress:Template_Tags/get_calendar | get_calendar]]
* [[WordPress:Template_Tags/get_calendar | get_calendar]]
* [[WordPress:Template_Tags/get_posts | get_posts]]
* [[WordPress:Template_Tags/get_posts | get_posts]]
第120行: 第124行:
* [[WordPress:Template_Tags/query_posts | query_posts]] (Version 1.5)
* [[WordPress:Template_Tags/query_posts | query_posts]] (Version 1.5)
* [[WordPress:Template_Tags/rss_enclosure | rss_enclosure]] (Version 1.5)
* [[WordPress:Template_Tags/rss_enclosure | rss_enclosure]] (Version 1.5)
* [[WordPress:Template_Tags/wp_tag_cloud | wp_tag_cloud]] (Version 2.3)
* [[WordPress:Template_Tags/the_search_query | the_search_query]] (Version 2.1)
* [[WordPress:Template_Tags/the_search_query | the_search_query]] (Version 2.1)


|valign="top" bgcolor="#f0f0ff" style="border:1px solid #c6c9ff;padding:1em;padding-top:0.5em; color: black;" width="50%"|
|valign="top" bgcolor="#f0f0ff" style="border:1px solid #c6c9ff;padding:1em;padding-top:0.5em; color: black;" width="50%"|


== Geo tags ==
== Geo 标签 ==


Geo features were moved to a plugin implementation with WordPress 1.5. Tags in parentheses are the plugin version.
Geo 功能WordPress 1.5时被移到一个插件中执行. 圆括号中的标签是这个插件的版本.


* [[WordPress:Template_Tags/print_Lat | print_Lat]] (the_Lat)
* [[WordPress:Template_Tags/print_Lat | print_Lat]] (the_Lat)
第146行: 第148行:
|bgcolor="#fbfbef" style="border:1px solid #ffc9c9;padding:1em;padding-top:0.5em; color: black;" width="50%"|
|bgcolor="#fbfbef" style="border:1px solid #ffc9c9;padding:1em;padding-top:0.5em; color: black;" width="50%"|


== Link tags ==
== 链接标签 ==


* [[WordPress:Template_Tags/edit_post_link | edit_post_link]]
* [[WordPress:Template_Tags/edit_post_link | edit_post_link]]
* [[WordPress:Template_Tags/edit_comment_link | edit_comment_link]]
* [[WordPress:Template_Tags/edit_comment_link | edit_comment_link]]
* [[WordPress:Template_Tags/wp_link_pages | wp_link_pages]]
* [[WordPress:Template_Tags/wp_link_pages | wp_link_pages]]
* [[WordPress:Template_Tags/link_pages | link_pages]] (Deprecated in 2.1)
* <s>[[WordPress:Template_Tags/link_pages | link_pages]]</s> (Deprecated in 2.1)
* [[WordPress:Template_Tags/get_year_link | get_year_link]]
* [[WordPress:Template_Tags/get_year_link | get_year_link]]
* [[WordPress:Template_Tags/get_month_link | get_month_link]]
* [[WordPress:Template_Tags/get_month_link | get_month_link]]
第160行: 第162行:
|valign="top" bgcolor="#f0f0ff" style="border:1px solid #c6c9ff;padding:1em;padding-top:0.5em; color: black;" width="50%"|
|valign="top" bgcolor="#f0f0ff" style="border:1px solid #c6c9ff;padding:1em;padding-top:0.5em; color: black;" width="50%"|


== Links Manager tags ==
== 链接管理标签 ==


* [[WordPress:Template_Tags/get_links_list | get_links_list]] (Deprecated in 2.3)
* <s>[[WordPress:Template_Tags/get_links_list | get_links_list]]</s> (Deprecated in 2.3)
* [[WordPress:Template_Tags/wp_get_links | wp_get_links]] (Deprecated in 2.3)
* <s>[[WordPress:Template_Tags/wp_get_links | wp_get_links]]</s> (Deprecated in 2.3)
* [[WordPress:Template_Tags/get_links | get_links]] (Deprecated in 2.3)
* <s>[[WordPress:Template_Tags/get_links | get_links]]</s> (Deprecated in 2.3)
* <s>[[WordPress:Template_Tags/wp_get_linksbyname | wp_get_linksbyname]]</s> (Deprecated in 2.1)
* <s>[[WordPress:Template_Tags/get_linksbyname | get_linksbyname]]</s> (Deprecated in 2.1)
* [[WordPress:Template_Tags/wp_list_bookmarks | wp_list_bookmarks]] (Version 2.1)
* [[WordPress:Template_Tags/wp_list_bookmarks | wp_list_bookmarks]] (Version 2.1)
* [[WordPress:Template_Tags/wp_get_linksbyname | wp_get_linksbyname]] (Deprecated in 2.1)
* [[WordPress:Template_Tags/get_bookmarks | get_bookmarks]] (Version 2.1)
* [[WordPress:Template_Tags/get_linksbyname | get_linksbyname]] (Deprecated in 2.1)


|- valign="top"
|- valign="top"
|bgcolor="#fbfbef" style="border:1px solid #ffc9c9;padding:1em;padding-top:0.5em; color: black;" width="50%"|
|bgcolor="#fbfbef" style="border:1px solid #ffc9c9;padding:1em;padding-top:0.5em; color: black;" width="50%"|


== Permalink tags ==
== Permalink 标签 ==


* [[WordPress:Template_Tags/permalink_anchor | permalink_anchor]]
* [[WordPress:Template_Tags/permalink_anchor | permalink_anchor]]
第180行: 第183行:


|valign="top" bgcolor="#f0f0ff" style="border:1px solid #c6c9ff;padding:1em;padding-top:0.5em; color: black;" width="50%"|
|valign="top" bgcolor="#f0f0ff" style="border:1px solid #c6c9ff;padding:1em;padding-top:0.5em; color: black;" width="50%"|
== Post tags ==
== 文章标签 ==


While in [[WordPress:The Loop]], these values can be accessed through the <tt>$post</tt> object.
[[WordPress:The Loop|Loop]], 这些值可以通过<tt>$post</tt>对象来存取。


* [[WordPress:Template_Tags/the_ID | the_ID]]
* [[WordPress:Template_Tags/the_ID | the_ID]]
* [[WordPress:Template_Tags/the_title | the_title]]
* [[WordPress:Template_Tags/the_title | the_title]]
* [[WordPress:Template_Tags/the_title_attribute | the_title_attribute]]
* [[WordPress:Template_Tags/the_title_attribute | the_title_attribute]] (Version 2.3)
* [[WordPress:Template_Tags/single_post_title | single_post_title]]
* [[WordPress:Template_Tags/single_post_title | single_post_title]]
* [[WordPress:Template_Tags/the_title_rss | the_title_rss]]
* [[WordPress:Template_Tags/the_title_rss | the_title_rss]]
第194行: 第197行:
* [[WordPress:Template_Tags/the_excerpt_rss | the_excerpt_rss]]
* [[WordPress:Template_Tags/the_excerpt_rss | the_excerpt_rss]]
* [[WordPress:Template_Tags/previous_post_link | previous_post_link]]
* [[WordPress:Template_Tags/previous_post_link | previous_post_link]]
* [[WordPress:Template_Tags/previous_post | previous_post]] (Deprecated)
* <s>[[WordPress:Template_Tags/previous_post | previous_post]]</s> (Deprecated)
* [[WordPress:Template_Tags/next_post_link | next_post_link]]
* [[WordPress:Template_Tags/next_post_link | next_post_link]]
* [[WordPress:Template_Tags/next_post | next_post]] (Deprecated)
* <s>[[WordPress:Template_Tags/next_post | next_post]]</s> (Deprecated)
* [[WordPress:Template_Tags/posts_nav_link | posts_nav_link]]
* [[WordPress:Template_Tags/posts_nav_link | posts_nav_link]]
* [[WordPress:Template_Tags/the_meta | the_meta]]
* [[WordPress:Template_Tags/the_meta | the_meta]]
* [[WordPress:Template_Tags/the_tags | the_tags]] (Version 2.3)
* [[WordPress:Template_Tags/the_tags | the_tags]] (Version 2.3)
* [[WordPress:Template_Tags/wp_count_posts | wp_count_posts]] (Version 2.5)




第206行: 第208行:
|bgcolor="#fbfbef" style="border:1px solid #ffc9c9;padding:1em;padding-top:0.5em; color: black;" width="50%"|
|bgcolor="#fbfbef" style="border:1px solid #ffc9c9;padding:1em;padding-top:0.5em; color: black;" width="50%"|


== Tag tags ==
== Tag 标签 ==


* [[WordPress:Template_Tags/wp_tag_cloud | wp_tag_cloud]] (Version 2.3)
* [[WordPress:Template_Tags/wp_tag_cloud | wp_tag_cloud]] (Version 2.3)
第216行: 第218行:
|valign="top" bgcolor="#f0f0ff" style="border:1px solid #c6c9ff;padding:1em;padding-top:0.5em; color: black;" width="50%"|
|valign="top" bgcolor="#f0f0ff" style="border:1px solid #c6c9ff;padding:1em;padding-top:0.5em; color: black;" width="50%"|


== Trackback tags ==
== Trackback 标签 ==


* [[WordPress:Template_Tags/trackback_url | trackback_url]]
* [[WordPress:Template_Tags/trackback_url | trackback_url]]
第223行: 第225行:
|}
|}


== External Resources ==
==外部资源==


* [http://guff.szub.net/wordpress/template-tags/ szub.net: WordPress Template Tags reference page]
* [http://guff.szub.net/wordpress/template-tags/ szub.net: WordPress Template Tags reference page]
* [http://solutoire.com/tagstention/ Solutoire.com: Template Tag Dreamweaver extension (TAGStention)]
* [http://solutoire.com/tagstention/ Solutoire.com: Template Tag Dreamweaver extension (TAGStention)]
* French translation: [http://codex.wordpress.org/fr:Marqueurs_de_Modele  http://codex.wordpress.org/fr:Marqueurs_de_Modele]
* French translation: [http://codex.wordpress.org/fr:Marqueurs_de_Modele  http://codex.wordpress.org/fr:Marqueurs_de_Modele]
== 其他资源 ==
* [http://guff.szub.net/wordpress/template-tags/ szub.net: WordPress 模板标签参考页面]
* [http://solutoire.com/tagstention/ Solutoire.com: 模板标签Dreamweaver extension (TAGStention)]
* 法语翻译: [http://codex.wordpress.org/fr:Marqueurs_de_Modele  http://codex.wordpress.org/fr:Marqueurs_de_Modele]

2008年7月5日 (六) 14:19的最新版本

导航: 上一级 | WordPress | 首页 | WordPress中文论坛 | WordPress主机 | CMS程序 | 论坛程序 | ECShop | ShopNC | PowerEasy

模板标签是用在你的blog中的 模板中,显示动态信息或者自定义你的blog,它提供的独立有趣的工具。下面是WordPress中一般用户使用的标签列表,按照功能分类。

更多关于模板标签的信息, 参见如下内容:

如果你有什么有趣的关于模板标签的运行的想法,我们鼓励你添加到它的文件中,这样对WordPress其他用户有一定的好处。尽管如此,首先查看 为WordPress做贡献获得编辑Codex页面的帮助和指导。

注意: 下边的一些模板标签列表是一些针对WordPress更新的,将会标注出来(如: " 2.1版") 这意味着在旧版本中这种标签不可用。列出的标签从版本2.0或稍早一些的版本后已经 "不可用"了 。更新的 不可用的标签会使用版本号标记出从哪个版本开始不可用(如"Deprecated in 2.1")。

作者标签[ ]

分类标签[ ]

评论标签[ ]

日期和时间标签[ ]

一般标签[ ]

Geo 标签[ ]

Geo 功能WordPress 1.5时被移到一个插件中执行. 圆括号中的标签是这个插件的版本.

链接标签[ ]

链接管理标签[ ]

Permalink 标签[ ]

文章标签[ ]

Loop中, 这些值可以通过$post对象来存取。


Tag 标签[ ]

Trackback 标签[ ]

外部资源[ ]

其他资源[ ]