m (→External Resources) |
m |
||
(153 intermediate revisions by 50 users not shown) | |||
Line 1: | Line 1: | ||
+ | |||
{{Languages| |
{{Languages| |
||
− | {{en|Template Tags}} |
+ | {{en|Template Tags}} |
+ | {{es|Template Tags}} |
||
− | {{fr|Marqueurs de Modele}} • |
||
+ | {{fr|Marqueurs de Modele}} |
||
− | {{ja|テンプレートタグ}} |
||
+ | {{it|Tag dei template}} |
||
+ | {{ja|テンプレートタグ}} |
||
+ | {{ko|템플릿 태그}} |
||
+ | {{pt-br|Tags de Modelos}} |
||
+ | {{ru|Теги шаблонов}} |
||
+ | {{th|Template Tags}} |
||
+ | {{tr|Tema Etiketleri}} |
||
+ | {{zh-hans|模板标签}} |
||
+ | {{zh-tw|範本標籤}} |
||
}} |
}} |
||
__TOC__ |
__TOC__ |
||
Line 8: | Line 18: | ||
For further information on template tags and templates in general, see the following: |
For further information on template tags and templates in general, see the following: |
||
− | * [[Stepping Into Template Tags]] |
+ | * [[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]] |
+ | * [[Include Tags]] - additional tags related to including one Template file within another. |
− | * [[Conditional Tags]] |
+ | * [[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. |
||
− | * [[Templates]] (a comprehensive list of Template, Theme, and Tag resources) |
||
+ | * [[:Category:Deprecated Functions|Deprecated Functions]] - additional tags that are Deprecated. |
||
− | * [[Stepping Into Templates]] (introduction to Template files) |
||
+ | * [[Templates]] - a comprehensive list of Template, Theme, and Tag resources. |
||
+ | * [[Stepping Into Templates]] - introduction to Template files. |
||
− | 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]] for help and guidelines on editing Codex pages. |
+ | '''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 [[Codex:Guidelines|guidelines]] on editing Codex pages. |
+ | ==Files== |
||
− | '''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"). |
||
+ | Template tags files are stored in the {{Trac|wp-includes}} directory. The files have the suffix of "-template.php" to distinguish them from other WordPress files. There are 9 template tags files: |
||
− | ==Tags== |
||
+ | * {{Trac|wp-includes/general-template.php}} |
||
− | {| cellspacing="10" width="100%" |
||
+ | * {{Trac|wp-includes/author-template.php}} |
||
− | |- valign="top" |
||
+ | * {{Trac|wp-includes/bookmark-template.php}} |
||
− | | width="50%" | |
||
+ | * {{Trac|wp-includes/category-template.php}} |
||
+ | * {{Trac|wp-includes/comment-template.php}} |
||
+ | * {{Trac|wp-includes/link-template.php}} |
||
+ | * {{Trac|wp-includes/media-template.php}} |
||
+ | * {{Trac|wp-includes/post-template.php}} |
||
+ | * {{Trac|wp-includes/post-thumbnail-template.php}} |
||
+ | * {{Trac|wp-includes/nav-menu-template.php}} |
||
+ | ==Tags== |
||
− | {| class="widefat" |
||
− | |- style="background:#464646; color:#d7d7d7;" |
||
− | ! '''Author tags''' |
||
− | |- |
||
− | | |
||
− | * [[Template_Tags/the_author | the_author]] |
||
− | * [[Template_Tags/the_author_description | the_author_description]] |
||
− | * [[Template_Tags/the_author_login | the_author_login]] |
||
− | * [[Template_Tags/the_author_firstname | the_author_firstname]] |
||
− | * [[Template_Tags/the_author_lastname | the_author_lastname]] |
||
− | * [[Template_Tags/the_author_nickname | the_author_nickname]] |
||
− | * [[Template_Tags/the_author_ID | the_author_ID]] |
||
− | * [[Template_Tags/the_author_email | the_author_email]] |
||
− | * [[Template_Tags/the_author_url | the_author_url]] |
||
− | * [[Template_Tags/the_author_link | the_author_link]] (Version 2.1) |
||
− | * <s>[[Template_Tags/the_author_icq | the_author_icq]]</s> (Deprecated) |
||
− | * [[Template_Tags/the_author_aim | the_author_aim]] |
||
− | * [[Template_Tags/the_author_yim | the_author_yim]] |
||
− | * <s>[[Template_Tags/the_author_msn | the_author_msn]]</s> (Deprecated) |
||
− | * [[Template_Tags/the_author_posts | the_author_posts]] |
||
− | * [[Template_Tags/the_author_posts_link | the_author_posts_link]] |
||
− | * [[Template_Tags/the_modified_author | the_modified_author]] (Version 2.8) |
||
− | * <s>[[Template_Tags/list_authors | list_authors]]</s> (Deprecated) |
||
− | * [[Template_Tags/wp_list_authors | wp_list_authors]] |
||
− | * [[Template_Tags/the_author_meta | the_author_meta]] (Version 2.8) |
||
− | |} |
||
− | |||
− | | width="50%" | |
||
− | |||
− | {| class="widefat" |
||
− | |- style="background:#464646; color:#d7d7d7;" |
||
− | ! '''Category tags''' |
||
− | |- |
||
− | | |
||
− | * [[Template_Tags/the_category | the_category]] |
||
− | * [[Template_Tags/the_category_rss | the_category_rss]] |
||
− | * <s>[[Template_Tags/the_category_ID | the_category_ID]]</s> (Deprecated) |
||
− | * <s>[[Template_Tags/the_category_head | the_category_head]]</s> (Deprecated) |
||
− | * [[Template_Tags/single_cat_title | single_cat_title]] |
||
− | * [[Template_Tags/category_nicename | category_nicename]] |
||
− | * [[Template_Tags/category_description | category_description]] |
||
− | * [[Template_Tags/wp_dropdown_categories | wp_dropdown_categories]] (Version 2.1) |
||
− | * <s>[[Template_Tags/dropdown_cats | dropdown_cats]]</s> (Deprecated in 2.1) |
||
− | * [[Template_Tags/wp_list_categories | wp_list_categories]] (Version 2.1) |
||
− | * <s>[[Template_Tags/list_cats | list_cats]]</s> (Deprecated in 2.1) |
||
− | * <s>[[Template_Tags/wp_list_cats | wp_list_cats]]</s> (Deprecated in 2.1) |
||
− | * [[Template_Tags/in_category | in_category]] |
||
− | * [[Template_Tags/get_category_parents | get_category_parents]] |
||
− | * [[Template_Tags/get_the_category | get_the_category]] |
||
− | * [[Function_Reference/get_category_link | get_category_link]] |
||
− | |} |
||
− | |||
− | |- valign="top" |
||
− | | width="50%" | |
||
− | |||
− | {| class="widefat" |
||
− | |- style="background:#464646; color:#d7d7d7;" |
||
− | ! '''Date and Time tags''' |
||
− | |- |
||
− | | |
||
− | * [[Template_Tags/the_time | the_time]] |
||
− | * [[Template_Tags/the_date | the_date]] |
||
− | * [[Template_Tags/the_date_xml | the_date_xml]] |
||
− | * <s>[[Template_Tags/the_weekday | the_weekday]]</s> (Deprecated) |
||
− | * <s>[[Template_Tags/the_weekday_date | the_weekday_date]]</s> (Deprecated) |
||
− | * [[Template_Tags/the_modified_time | the_modified_time]] |
||
− | * [[Template_Tags/the_modified_date | the_modified_date]] (Version 2.1) |
||
− | * [[Template_Tags/single_month_title | single_month_title]] |
||
− | * [[Template_Tags/get_the_time | get_the_time]] (Version 1.5) |
||
− | * [[Template_Tags/get_day_link | get_day_link]] |
||
− | * [[Template_Tags/get_month_link | get_month_link]] |
||
− | * [[Template_Tags/get_year_link | get_year_link]] |
||
− | * [[Template_Tags/get_calendar | get_calendar]] |
||
− | |} |
||
− | |||
− | | width="50%" | |
||
− | |||
− | {| class="widefat" |
||
− | |- style="background:#464646; color:#d7d7d7;" |
||
− | ! '''Tag tags''' |
||
− | |- |
||
− | | |
||
− | * [[Template_Tags/the_tags | the_tags]] (Version 2.3) |
||
− | * [[Template_Tags/get_the_tags | get_the_tags]] (Version 2.3) |
||
− | * [[Template_Tags/get_the_tag_list | get_the_tag_list]] (Version 2.3) |
||
− | * [[Template_Tags/single_tag_title | single_tag_title]] (Version 2.3) |
||
− | * [[Function Reference/get_tag_link | get_tag_link]] |
||
− | * [[Template_Tags/wp_tag_cloud | wp_tag_cloud]] (Version 2.3) |
||
− | * [[Template_Tags/wp_generate_tag_cloud | wp_generate_tag_cloud]] |
||
− | * [[Template_Tags/tag_description | tag_description]] (Version 2.8) |
||
− | |} |
||
− | |||
− | |- valign="top" |
||
− | | width="50%" | |
||
− | |||
− | {| class="widefat" |
||
− | |- style="background:#464646; color:#d7d7d7;" |
||
− | ! '''Post Link tags''' |
||
− | |- |
||
− | | |
||
− | * [[Template_Tags/edit_post_link | edit_post_link]] |
||
− | * [[Template_Tags/edit_comment_link | edit_comment_link]] |
||
− | * [[Template_Tags/wp_link_pages | wp_link_pages]] |
||
− | * <s>[[Template_Tags/link_pages | link_pages]]</s> (Deprecated in 2.1) |
||
− | * [[Template_Tags/previous_posts_link | previous_posts_link]] |
||
− | * [[Template_Tags/next_posts_link | next_posts_link]] |
||
− | * [[Template_Tags/previous_comments_link | previous_comments_link]] (Version 2.7) |
||
− | * [[Template_Tags/next_comments_link | next_comments_link]] (Version 2.7) |
||
− | * [[Template_Tags/paginate_comments_links | paginate_comments_links]] (Version 2.7) |
||
− | |} |
||
+ | ===General tags=== |
||
− | | width="50%" | |
||
+ | {{Trac|wp-includes/general-template.php}} |
||
+ | * [[Function Reference/get_header | get_header()]] |
||
− | {| class="widefat" |
||
+ | * [[Function Reference/get_footer | get_footer()]] |
||
− | |- style="background:#464646; color:#d7d7d7;" |
||
+ | * [[Function Reference/get_sidebar | get_sidebar()]] |
||
− | ! '''Links Manager tags''' |
||
+ | * [[Function Reference/get_template_part | get_template_part()]] |
||
− | |- |
||
+ | * [[Function Reference/get_search_form | get_search_form()]] |
||
− | | |
||
+ | * [[Function Reference/wp_loginout | wp_loginout()]] |
||
− | * [[Template_Tags/wp_list_bookmarks | wp_list_bookmarks]] (Version 2.1) |
||
+ | * [[Function Reference/wp_logout_url | wp_logout_url()]] |
||
− | * [[Template_Tags/get_bookmarks | get_bookmarks]] (Version 2.1) |
||
+ | * [[Function Reference/wp_login_url | wp_login_url()]] |
||
− | |} |
||
+ | * [[Function Reference/wp_login_form | wp_login_form()]] |
||
+ | * [[Function Reference/wp_lostpassword_url | wp_lostpassword_url()]] |
||
+ | * [[Function Reference/wp_register | wp_register()]] |
||
+ | * [[Function Reference/wp_meta | wp_meta()]] |
||
+ | * [[Function Reference/bloginfo | bloginfo()]] |
||
+ | * [[Function Reference/get_bloginfo | get_bloginfo()]] |
||
+ | * [[Function Reference/get_current_blog_id | get_current_blog_id()]] |
||
+ | * [[Function Reference/wp_title | wp_title()]] |
||
+ | * [[Function Reference/single_post_title | single_post_title()]] |
||
+ | * [[Function Reference/post_type_archive_title | post_type_archive_title()]] |
||
+ | * [[Function Reference/single_cat_title | single_cat_title()]] |
||
+ | * [[Function Reference/single_tag_title | single_tag_title()]] |
||
+ | * [[Function Reference/single_term_title | single_term_title()]] |
||
+ | * [[Function Reference/single_month_title | single_month_title()]] |
||
+ | * [[Function Reference/get_archives_link | get_archives_link()]] |
||
+ | * [[Function Reference/wp_get_archives | wp_get_archives()]] |
||
+ | * [[Function Reference/calendar_week_mod | calendar_week_mod()]] |
||
+ | * [[Function Reference/get_calendar | get_calendar()]] |
||
+ | * [[Function Reference/delete_get_calendar_cache | delete_get_calendar_cache()]] |
||
+ | * [[Function Reference/allowed_tags | allowed_tags()]] |
||
+ | * [[Function Reference/wp_ajaxurl|wp_ajaxurl()]] ?? Not defined in any WP file, at least until 12/01/19. |
||
+ | * [[Function Reference/wp_enqueue_script|wp_enqueue_script()]] |
||
+ | ===Author tags=== |
||
− | |- valign="top" |
||
+ | {{Trac|wp-includes/author-template.php}} |
||
− | | width="50%" | |
||
+ | * [[Function Reference/the_author | the_author()]] |
||
− | {| class="widefat" |
||
+ | * [[Function Reference/get_the_author | get_the_author()]] |
||
− | |- style="background:#464646; color:#d7d7d7;" |
||
+ | * [[Function Reference/the_author_link | the_author_link()]] |
||
− | ! '''Post tags''' |
||
+ | * [[Function Reference/get_the_author_link | get_the_author_link()]] |
||
− | |- |
||
+ | * [[Function Reference/the_author_meta | the_author_meta()]] |
||
− | | |
||
+ | * [[Function Reference/the_author_posts | the_author_posts()]] |
||
− | While in [[The Loop]], these values can be accessed through the <tt>$post</tt> object. |
||
+ | * [[Function Reference/the_author_posts_link | the_author_posts_link()]] |
||
+ | * [[Function Reference/wp_dropdown_users | wp_dropdown_users()]] |
||
+ | * [[Function Reference/wp_list_authors | wp_list_authors()]] |
||
+ | * [[Function Reference/get_author_posts_url | get_author_posts_url()]] |
||
+ | ===Bookmark tags=== |
||
− | * [[Template_Tags/the_ID | the_ID]] |
||
+ | {{Trac|wp-includes/bookmark-template.php}} and |
||
− | * [[Template_Tags/the_title | the_title]] |
||
+ | {{Trac|wp-includes/bookmark.php}} |
||
− | * [[Template_Tags/the_title_attribute | the_title_attribute]] (Version 2.3) |
||
+ | * [[Function Reference/wp_list_bookmarks | wp_list_bookmarks()]] |
||
− | * [[Template_Tags/single_post_title | single_post_title]] |
||
+ | * [[Function Reference/get_bookmark | get_bookmark()]] |
||
− | * [[Template_Tags/the_title_rss | the_title_rss]] |
||
+ | * [[Function Reference/get_bookmark_field | get_bookmark_field()]] |
||
− | * [[Template_Tags/the_content | the_content]] |
||
+ | * [[Function Reference/get_bookmarks | get_bookmarks()]] |
||
− | * [[Template_Tags/the_content_rss | the_content_rss]] |
||
− | * [[Template_Tags/the_excerpt | the_excerpt]] |
||
− | * [[Template_Tags/the_excerpt_rss | the_excerpt_rss]] |
||
− | * [[Template_Tags/next_post_link | next_post_link]] |
||
− | * [[Template_Tags/previous_post_link | previous_post_link]] |
||
− | * [[Template_Tags/next_posts_link | next_posts_link]] |
||
− | * [[Template_Tags/previous_posts_link | previous_posts_link]] |
||
− | * [[Template_Tags/posts_nav_link | posts_nav_link]] |
||
− | * [[Template_Tags/sticky_class | sticky_class]] (Version 2.7) |
||
− | * [[Template_Tags/the_meta | the_meta]] |
||
− | * [[Template_Tags/the_tags | the_tags]] (Version 2.3) |
||
− | |} |
||
+ | ===Category tags=== |
||
− | | width="50%" | |
||
+ | {{Trac|wp-includes/category-template.php}} |
||
+ | * [[Function Reference/category_description | category_description()]] |
||
− | {| class="widefat" |
||
+ | * [[Function Reference/single_cat_title | single_cat_title()]] |
||
− | |- style="background:#464646; color:#d7d7d7;" |
||
+ | * [[Function Reference/the_category | the_category()]] |
||
− | ! '''Comment tags''' |
||
+ | * [[Function Reference/the_category_rss | the_category_rss()]] |
||
− | |- |
||
+ | * [[Function Reference/wp_dropdown_categories | wp_dropdown_categories()]] |
||
− | | |
||
+ | * [[Template Tags/wp_list_categories | wp_list_categories()]] |
||
− | * [[Template_Tags/comments_number | comments_number]] |
||
+ | * [[Function Reference/single_tag_title | single_tag_title()]] |
||
− | * [[Template_Tags/comments_link | comments_link]] |
||
+ | * [[Function Reference/tag_description | tag_description()]] |
||
− | * [[Template_Tags/comments_rss_link | comments_rss_link]] |
||
+ | * [[Function Reference/the_tags | the_tags()]] |
||
− | * [[Template_Tags/comments_popup_script | comments_popup_script]] |
||
+ | * [[Function Reference/wp_generate_tag_cloud | wp_generate_tag_cloud()]] |
||
− | * [[Template_Tags/comments_popup_link | comments_popup_link]] |
||
+ | * [[Function Reference/wp_tag_cloud | wp_tag_cloud()]] |
||
− | * [[Template_Tags/comment_ID | comment_ID]] |
||
+ | * [[Function Reference/term_description | term_description()]] |
||
− | * [[Template_Tags/comment_author | comment_author]] |
||
+ | * [[Function Reference/single_term_title | single_term_title()]] |
||
− | * [[Template_Tags/comment_author_IP | comment_author_IP]] |
||
+ | * [[Function Reference/get_the_term_list | get_the_term_list()]] |
||
− | * [[Template_Tags/comment_author_email | comment_author_email]] |
||
+ | * [[Function Reference/the_terms | the_terms()]] |
||
− | * [[Template_Tags/comment_author_url | comment_author_url]] |
||
+ | * [[Function Reference/the_taxonomies | the_taxonomies()]] |
||
− | * [[Template_Tags/comment_author_email_link | comment_author_email_link]] |
||
− | * [[Template_Tags/comment_author_url_link | comment_author_url_link]] |
||
− | * [[Template_Tags/comment_author_link | comment_author_link]] |
||
− | * [[Template_Tags/comment_type | comment_type]] |
||
− | * [[Template_Tags/comment_text | comment_text]] |
||
− | * [[Template_Tags/comment_excerpt | comment_excerpt]] |
||
− | * [[Template_Tags/comment_date | comment_date]] |
||
− | * [[Template_Tags/comment_time | comment_time]] |
||
− | * [[Template_Tags/comment_author_rss | comment_author_rss]] |
||
− | * [[Template_Tags/comment_text_rss | comment_text_rss]] |
||
− | * [[Template_Tags/comment_link_rss | comment_link_rss]] |
||
− | * [[Template_Tags/permalink_comments_rss | permalink_comments_rss]] |
||
− | * [[Template_Tags/wp_list_comments | wp_list_comments]] (Version 2.7) |
||
− | * [[Template_Tags/comment_reply_link | comment_reply_link]] (Version 2.7) |
||
− | * [[Template_Tags/cancel_comment_reply_link | cancel_comment_reply_link]] (Version 2.7) |
||
− | * [[Template_Tags/comment_form_title | comment_form_title]] (Version 2.7) |
||
− | * [[Template_Tags/comment_id_fields | comment_id_fields]] (Version 2.7) |
||
− | |} |
||
+ | ===Comment tags=== |
||
− | |- valign="top" |
||
+ | {{Trac|wp-includes/comment-template.php}} |
||
− | | width="50%" | |
||
+ | * [[Function Reference/cancel_comment_reply_link | cancel_comment_reply_link()]] |
||
− | {| class="widefat" |
||
+ | * [[Function Reference/comment_author | comment_author()]] |
||
− | |- style="background:#464646; color:#d7d7d7;" |
||
+ | * [[Function Reference/comment_author_email | comment_author_email()]] |
||
− | ! '''Permalink tags''' |
||
+ | * [[Function Reference/comment_author_email_link | comment_author_email_link()]] |
||
− | |- |
||
+ | * [[Function Reference/comment_author_IP | comment_author_IP()]] |
||
− | | |
||
+ | * [[Function Reference/comment_author_link | comment_author_link()]] |
||
− | * [[Template_Tags/permalink_anchor | permalink_anchor]] |
||
+ | * [[Function Reference/comment_author_rss | comment_author_rss()]] |
||
− | * [[Template_Tags/get_permalink | get_permalink]] |
||
+ | * [[Function Reference/comment_author_url | comment_author_url()]] |
||
− | * [[Template_Tags/the_permalink | the_permalink]] |
||
+ | * [[Function Reference/comment_author_url_link | comment_author_url_link()]] |
||
− | * [[Template_Tags/permalink_single_rss | permalink_single_rss]] |
||
+ | * [[Function Reference/comment_class|comment_class()]] |
||
− | |} |
||
+ | * [[Function Reference/comment_date | comment_date()]] |
||
+ | * [[Function Reference/comment_excerpt | comment_excerpt()]] |
||
+ | * [[Function Reference/comment_form_title | comment_form_title()]] |
||
+ | * [[Function Reference/comment_form|comment_form()]] |
||
+ | * [[Function Reference/comment_ID | comment_ID()]] |
||
+ | * [[Function Reference/comment_id_fields | comment_id_fields()]] |
||
+ | * [[Function Reference/comment_reply_link | comment_reply_link()]] |
||
+ | * [[Function Reference/comment_text | comment_text()]] |
||
+ | * [[Function Reference/comment_text_rss | comment_text_rss()]] |
||
+ | * [[Function Reference/comment_time | comment_time()]] |
||
+ | * [[Function Reference/comment_type | comment_type()]] |
||
+ | * [[Function Reference/comments_link | comments_link()]] |
||
+ | * [[Function Reference/comments_number | comments_number()]] |
||
+ | * [[Function Reference/comments_popup_link | comments_popup_link()]] |
||
+ | * [[Function Reference/comments_popup_script | comments_popup_script()]] |
||
+ | * [[Function Reference/comments_rss_link | comments_rss_link()]] |
||
+ | * [[Function Reference/get_avatar | get_avatar()]] |
||
+ | * [[Function Reference/next_comments_link | next_comments_link()]] |
||
+ | * [[Function Reference/paginate_comments_links|paginate_comments_links()]] |
||
+ | * [[Function Reference/permalink_comments_rss | permalink_comments_rss()]] |
||
+ | * [[Function Reference/previous_comments_link | previous_comments_link()]] |
||
+ | * [[Function Reference/wp_list_comments | wp_list_comments()]] |
||
+ | ===Link tags=== |
||
− | | width="50%" | |
||
+ | {{Trac|wp-includes/link-template.php}} |
||
+ | * [[Function Reference/the_permalink | the_permalink()]] |
||
− | {| class="widefat" |
||
+ | * [[Function Reference/user_trailingslashit | user_trailingslashit()]] |
||
− | |- style="background:#464646; color:#d7d7d7;" |
||
+ | * [[Function Reference/permalink_anchor | permalink_anchor()]] |
||
− | ! '''Trackback tags''' |
||
+ | * [[Function Reference/get_permalink | get_permalink()]] |
||
− | |- |
||
+ | * [[Function Reference/get_post_permalink|get_post_permalink()]] |
||
− | | |
||
+ | * [[Function Reference/post_permalink | post_permalink()]] |
||
− | * [[Template_Tags/trackback_url | trackback_url]] |
||
+ | * [[Function Reference/get_page_link | get_page_link()]] |
||
− | * [[Template_Tags/trackback_rdf | trackback_rdf]] |
||
+ | * [[Function Reference/get_attachment_link | get_attachment_link()]] |
||
− | |} |
||
+ | * [[Function Reference/wp_shortlink_header|wp_shortlink_header()]] |
||
+ | * [[Function Reference/wp_shortlink_wp_head|wp_shortlink_wp_head()]] |
||
+ | * [[Function Reference/edit_bookmark_link | edit_bookmark_link()]] |
||
+ | * [[Function Reference/edit_comment_link | edit_comment_link()]] |
||
+ | * [[Function Reference/edit_post_link | edit_post_link()]] |
||
+ | * [[Template Tags/get_edit_post_link | get_edit_post_link()]] |
||
+ | * [[Function Reference/get_delete_post_link | get_delete_post_link()]] |
||
+ | * [[Function Reference/edit_tag_link | edit_tag_link()]] |
||
+ | * [[Function Reference/get_admin_url|get_admin_url()]] |
||
+ | * [[Function Reference/get_home_url|get_home_url()]] |
||
+ | * [[Function Reference/get_site_url|get_site_url()]] |
||
+ | * [[Function Reference/home_url|home_url()]] |
||
+ | * [[Function Reference/site_url|site_url()]] |
||
+ | * [[Function Reference/get_search_link|get_search_link()]] |
||
+ | * [[Function Reference/get_search_query|get_search_query()]] |
||
+ | * [[Function Reference/the_feed_link|the_feed_link()]] |
||
+ | ===Post tags=== |
||
− | |- valign="top" |
||
+ | {{Trac|wp-includes/post-template.php}} |
||
− | | width="50%" | |
||
+ | * [[Function Reference/body_class | body_class()]] |
||
− | {| class="widefat" |
||
+ | * [[Function Reference/next_image_link | next_image_link()]] |
||
− | |- style="background:#464646; color:#d7d7d7;" |
||
+ | * [[Function Reference/next_post_link | next_post_link()]] |
||
− | ! '''General tags''' |
||
+ | * [[Function Reference/next_posts_link | next_posts_link()]] |
||
− | |- |
||
+ | * [[Function Reference/post_class | post_class()]] |
||
− | | |
||
+ | * [[Function Reference/post_password_required | post_password_required()]] |
||
− | * [[Template_Tags/bloginfo | bloginfo]] |
||
+ | * [[Function Reference/posts_nav_link | posts_nav_link()]] |
||
− | * [[Template_Tags/bloginfo_rss | bloginfo_rss]] |
||
+ | * [[Function Reference/previous_image_link | previous_image_link()]] |
||
− | * [[Template_Tags/get_bloginfo | get_bloginfo]] |
||
+ | * [[Function Reference/previous_post_link | previous_post_link()]] |
||
− | * [[Template_Tags/get_bloginfo_rss | get_bloginfo_rss]] |
||
+ | * [[Function Reference/previous_posts_link | previous_posts_link()]] |
||
− | * [[Template_Tags/wp_title | wp_title]] |
||
+ | * [[Function Reference/single_post_title | single_post_title()]] |
||
− | * [[Template_Tags/wp_get_archives | wp_get_archives]] |
||
+ | * [[Function Reference/sticky_class | sticky_class()]] |
||
− | * <s>[[Template_Tags/get_archives | get_archives]]</s> (Deprecated in 2.1) |
||
+ | * [[Function Reference/the_category | the_category()]] |
||
− | * [[Template_Tags/get_calendar | get_calendar]] |
||
+ | * [[Function Reference/the_category_rss | the_category_rss()]] |
||
− | * [[Template_Tags/get_posts | get_posts]] |
||
+ | * [[Function Reference/the_content | the_content()]] |
||
− | * [[Template_Tags/wp_list_pages | wp_list_pages]] |
||
+ | * [[Function Reference/the_content_rss | the_content_rss()]] |
||
− | * [[Template_Tags/wp_page_menu | wp_page_menu]] (Version 2.7) |
||
+ | * [[Function Reference/the_excerpt | the_excerpt()]] |
||
− | * [[Template_Tags/wp_dropdown_pages | wp_dropdown_pages]] |
||
+ | * [[Function Reference/the_excerpt_rss | the_excerpt_rss()]] |
||
− | * [[Template_Tags/wp_loginout | wp_loginout]] |
||
+ | * [[Function Reference/the_ID | the_ID()]] |
||
− | * [[Template_Tags/wp_register | wp_register]] |
||
+ | * [[Function Reference/the_meta | the_meta()]] |
||
− | * [[Template_Tags/wp_logout_url | wp_logout_url]] (Version 2.7) |
||
+ | * [[Function Reference/the_tags | the_tags()]] |
||
− | * [[Template_Tags/query_posts | query_posts]] |
||
+ | * [[Function Reference/the_title | the_title()]] |
||
− | * [[Template_Tags/rss_enclosure | rss_enclosure]] |
||
+ | * [[Function Reference/get_the_title | get_the_title()]] |
||
− | * [[Template_Tags/the_search_query | the_search_query]] |
||
+ | * [[Function Reference/the_title_attribute | the_title_attribute()]] |
||
− | |} |
||
+ | * [[Function Reference/the_title_rss | the_title_rss()]] |
||
+ | * [[Function Reference/wp_link_pages | wp_link_pages()]] |
||
+ | * [[Function Reference/get_attachment_link | get_attachment_link()]] |
||
+ | * [[Function Reference/wp_get_attachment_link | wp_get_attachment_link()]] |
||
+ | * [[Function Reference/the_attachment_link | the_attachment_link()]] |
||
+ | * [[Function Reference/the_search_query | the_search_query()]] |
||
+ | * [[Function Reference/is_attachment | is_attachment()]] |
||
+ | * [[Function Reference/wp_attachment_is_image | wp_attachment_is_image()]] |
||
+ | * [[Function Reference/wp_get_attachment_image | wp_get_attachment_image()]] |
||
+ | * [[Function Reference/wp_get_attachment_image_src | wp_get_attachment_image_src()]] |
||
+ | * [[Function Reference/wp_get_attachment_metadata | wp_get_attachment_metadata()]] |
||
+ | * [[Function Reference/get_the_date | get_the_date()]] |
||
+ | * [[Function Reference/single_month_title | single_month_title()]] |
||
+ | * [[Function Reference/the_date | the_date()]] |
||
+ | * [[Function Reference/the_date_xml | the_date_xml()]] |
||
+ | * [[Function Reference/the_modified_author | the_modified_author()]] |
||
+ | * [[Function Reference/the_modified_date | the_modified_date()]] |
||
+ | * [[Function Reference/the_modified_time | the_modified_time()]] |
||
+ | * [[Function Reference/the_time | the_time()]] |
||
+ | * [[Function Reference/the_shortlink|the_shortlink()]] |
||
+ | * [[Function Reference/wp_get_shortlink|wp_get_shortlink()]] |
||
+ | ===Post Thumbnail tags=== |
||
− | | width="50%" | |
||
+ | {{Trac|wp-includes/post-thumbnail-template.php}} |
||
+ | * [[Function Reference/has_post_thumbnail | has_post_thumbnail()]] |
||
− | {| class="widefat" |
||
+ | * [[Function Reference/get_post_thumbnail_id | get_post_thumbnail_id()]] |
||
− | |- style="background:#464646; color:#d7d7d7;" |
||
+ | * [[Function Reference/the_post_thumbnail | the_post_thumbnail()]] |
||
− | ! '''Geo tags''' |
||
+ | * [[Function Reference/get_the_post_thumbnail | get_the_post_thumbnail()]] |
||
− | |- |
||
− | | |
||
− | Geo features were moved to a plugin implementation with WordPress 1.5. Tags in parentheses are the plugin version. |
||
+ | ===Navigation Menu tags=== |
||
− | * [[Template_Tags/print_Lat | print_Lat]] (the_Lat) |
||
+ | {{Trac|wp-includes/nav-menu-template.php}} |
||
− | * [[Template_Tags/print_Lon | print_Lon]] (the_Lon) |
||
+ | * [[Function Reference/wp_nav_menu | wp_nav_menu()]] |
||
− | * [[Template_Tags/print_UrlPopNav | print_UrlPopNav]] (the_UrlPopNav) |
||
+ | * [[Function Reference/walk_nav_menu_tree | walk_nav_menu_tree()]] |
||
− | * [[Template_Tags/print_AcmeMap_Url | print_AcmeMap_Url]] (the_AcmeMap_Url) |
||
− | * [[Template_Tags/print_GeoURL_Url | print_GeoURL_Url]] (the_GeoURL_Url) |
||
− | * [[Template_Tags/print_GeoCache_Url | print_GeoCache_Url]] (the_GeoCache_Url) |
||
− | * [[Template_Tags/print_MapQuest_Url | print_MapQuest_Url]] (the_MapQuest_Url) |
||
− | * [[Template_Tags/print_SideBit_Url | print_SideBit_Url]] (the_SideBit_Url) |
||
− | * [[Template_Tags/print_DegreeConfluence_Url | print_DegreeConfluence_Url]] (the_DegreeConfluence_Url) |
||
− | * [[Template_Tags/print_TopoZone_Url | print_TopoZone_Url]] (the_TopoZone_Url) |
||
− | * [[Template_Tags/print_FindU_Url | print_FindU_Url]] (the_FindU_Url) |
||
− | * [[Template_Tags/print_MapTech_Url | print_MapTech_Url]] (the_MapTech_Url) |
||
− | |} |
||
+ | ==Resources== |
||
− | |} |
||
+ | * [[:Category:Template Tags|Template Tags Category]] |
||
− | == External Resources == |
||
+ | ==External Resources== |
||
− | * [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)] |
||
[[Category:Design and Layout]] |
[[Category:Design and Layout]] |
||
[[Category:Template Tags|*]] |
[[Category:Template Tags|*]] |
||
+ | [[Category:UI Link]] |
Languages: English • Español • Français • Italiano • 日本語 한국어 • Português do Brasil • Русский • ไทย • Türkçe • 中文(简体) • 中文(繁體) • (Add your language)
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:
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.
Template tags files are stored in the wp-includes
directory. The files have the suffix of "-template.php" to distinguish them from other WordPress files. There are 9 template tags files:
wp-includes/general-template.php
wp-includes/author-template.php
wp-includes/bookmark-template.php
wp-includes/category-template.php
wp-includes/comment-template.php
wp-includes/link-template.php
wp-includes/media-template.php
wp-includes/post-template.php
wp-includes/post-thumbnail-template.php
wp-includes/nav-menu-template.php
wp-includes/general-template.php
wp-includes/author-template.php
wp-includes/bookmark-template.php
and
wp-includes/bookmark.php
wp-includes/category-template.php
wp-includes/comment-template.php
wp-includes/post-thumbnail-template.php
wp-includes/nav-menu-template.php