(2.7: add comment_class) |
m |
||
(77 intermediate revisions by 43 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}} |
||
+ | {{it|Tag dei template}} |
||
{{ja|テンプレートタグ}} |
{{ja|テンプレートタグ}} |
||
+ | {{ko|템플릿 태그}} |
||
− | {{ru|Теги шаблона}} |
||
+ | {{pt-br|Tags de Modelos}} |
||
− | {{th|Template_Tags}} |
||
+ | {{ru|Теги шаблонов}} |
||
+ | {{th|Template Tags}} |
||
{{tr|Tema Etiketleri}} |
{{tr|Tema Etiketleri}} |
||
− | {{zh- |
+ | {{zh-hans|模板标签}} |
+ | {{zh-tw|範本標籤}} |
||
− | |||
}} |
}} |
||
__TOC__ |
__TOC__ |
||
Line 25: | Line 30: | ||
'''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. |
'''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== |
+ | 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: |
||
− | {| cellspacing="10" width="100%" |
||
− | |- valign="top" |
||
− | | width="50%" | |
||
+ | * {{Trac|wp-includes/general-template.php}} |
||
− | {| class="widefat" |
||
+ | * {{Trac|wp-includes/author-template.php}} |
||
− | |- style="background:#464646; color:#d7d7d7;" |
||
+ | * {{Trac|wp-includes/bookmark-template.php}} |
||
− | ! '''Include Tags''' |
||
+ | * {{Trac|wp-includes/category-template.php}} |
||
− | |- |
||
+ | * {{Trac|wp-includes/comment-template.php}} |
||
− | | |
||
+ | * {{Trac|wp-includes/link-template.php}} |
||
− | * [[Function Reference/get_header | get_header]] |
||
+ | * {{Trac|wp-includes/media-template.php}} |
||
− | * [[Function Reference/get_sidebar | get_sidebar]] |
||
+ | * {{Trac|wp-includes/post-template.php}} |
||
− | * [[Function Reference/get_search_form | get_search_form]] |
||
+ | * {{Trac|wp-includes/post-thumbnail-template.php}} |
||
− | * [[Function Reference/comments_template | comments_template]] |
||
+ | * {{Trac|wp-includes/nav-menu-template.php}} |
||
− | * [[Function Reference/get_footer | get_footer]] |
||
− | |} |
||
+ | ==Tags== |
||
− | | width="50%" | |
||
− | |||
− | {| class="widefat" |
||
− | |- style="background:#464646; color:#d7d7d7;" |
||
− | ! '''Blog info tags''' |
||
− | |- |
||
− | | |
||
− | * [[Template_Tags/bloginfo | bloginfo]] |
||
− | * [[Template_Tags/bloginfo_rss | bloginfo_rss]] |
||
− | * [[Function Reference/get_bloginfo | get_bloginfo]] |
||
− | * [[Function Reference/get_bloginfo_rss | get_bloginfo_rss]] |
||
− | |} |
||
− | |||
− | |- valign="top" |
||
− | | width="50%" | |
||
− | |||
− | {| class="widefat" |
||
− | |- style="background:#464646; color:#d7d7d7;" |
||
− | ! '''Lists & Dropdown tags''' |
||
− | |- |
||
− | | |
||
− | * [[Template_Tags/wp_list_authors | wp_list_authors]] |
||
− | * [[Template_Tags/wp_list_categories | wp_list_categories]] |
||
− | * [[Template_Tags/wp_list_pages | wp_list_pages]] |
||
− | * [[Template_Tags/wp_list_bookmarks | wp_list_bookmarks]] |
||
− | * [[Template_Tags/wp_list_comments | wp_list_comments]] |
||
− | * [[Template_Tags/wp_get_archives | wp_get_archives]] |
||
− | * [[Template_Tags/wp_page_menu | wp_page_menu]] |
||
− | * [[Template_Tags/wp_dropdown_pages | wp_dropdown_pages]] |
||
− | * [[Template_Tags/wp_dropdown_categories | wp_dropdown_categories]] |
||
− | * [[Template_Tags/wp_dropdown_users | wp_dropdown_users]] |
||
− | |} |
||
− | |||
− | | width="50%" | |
||
− | |||
− | {| class="widefat" |
||
− | |- style="background:#464646; color:#d7d7d7;" |
||
− | ! '''Login/Logout tags''' |
||
− | |- |
||
− | | |
||
− | * [[Function Reference/is_user_logged_in | is_user_logged_in]] |
||
− | * [[Function Reference/wp_login_url | wp_login_url]] |
||
− | * [[Function Reference/wp_logout_url | wp_logout_url]] |
||
− | * [[Function Reference/wp_lostpassword_url | wp_lostpassword_url]] |
||
− | * [[Function Reference/wp_registration_url | wp_registration_url]] |
||
− | * [[Function Reference/wp_logout | wp_logout]] |
||
− | * [[Function Reference/wp_loginout | wp_loginout]] |
||
− | * [[Function Reference/wp_register | wp_register]] |
||
− | |} |
||
− | |||
− | |- valign="top" |
||
− | | width="50%" | |
||
− | |||
− | {| class="widefat" |
||
− | |- style="background:#464646; color:#d7d7d7;" |
||
− | ! '''Post tags''' |
||
− | |- |
||
− | | |
||
− | * [[Template_Tags/the_ID | the_ID]] |
||
− | * [[Template_Tags/the_title | the_title]] |
||
− | * [[Template_Tags/the_title_rss | the_title_rss]] |
||
− | * [[Template_Tags/the_title_attribute | the_title_attribute]] |
||
− | * [[Template_Tags/single_post_title | single_post_title]] |
||
− | * [[Template_Tags/the_content | the_content]] |
||
− | * [[Template_Tags/the_content_rss | the_content_rss]] |
||
− | * [[Template_Tags/the_excerpt | the_excerpt]] |
||
− | * [[Template_Tags/the_excerpt_rss | the_excerpt_rss]] |
||
− | * [[Template_Tags/wp_link_pages | wp_link_pages]] |
||
− | * [[Template_Tags/posts_nav_link | posts_nav_link]] |
||
− | * [[Template_Tags/next_post_link | next_post_link]] |
||
− | * [[Template_Tags/next_posts_link | next_posts_link]] |
||
− | * [[Template_Tags/previous_post_link | previous_post_link]] |
||
− | * [[Template_Tags/previous_posts_link | previous_posts_link]] |
||
− | * [[Template Tags/next_image_link | next_image_link]] |
||
− | * [[Template Tags/previous_image_link | previous_image_link]] |
||
− | * [[Template_Tags/the_category | the_category]] |
||
− | * [[Template_Tags/the_category_rss | the_category_rss]] |
||
− | * [[Template_Tags/the_tags | the_tags]] |
||
− | * [[Template_Tags/the_meta | the_meta]] |
||
− | * [[Template_Tags/body_class | body_class]] |
||
− | * [[Template_Tags/post_class | post_class]] |
||
− | * [[Template_Tags/sticky_class | sticky_class]] |
||
− | * [[Template_Tags/post_password_required | post_password_required]] |
||
− | |} |
||
− | |||
− | | width="50%" | |
||
− | |||
− | {| class="widefat" |
||
− | |- style="background:#464646; color:#d7d7d7;" |
||
− | ! '''Comment tags''' |
||
− | |- |
||
− | | |
||
− | * [[Template_Tags/wp_list_comments | wp_list_comments]] |
||
− | * [[Template_Tags/comments_number | comments_number]] |
||
− | * [[Template_Tags/comments_link | comments_link]] |
||
− | * [[Template_Tags/comments_rss_link | comments_rss_link]] |
||
− | * [[Template_Tags/comments_popup_script | comments_popup_script]] |
||
− | * [[Template_Tags/comments_popup_link | comments_popup_link]] |
||
− | * [[Template_Tags/comment_ID | comment_ID]] |
||
− | * [[Template_Tags/comment_id_fields | comment_id_fields]] |
||
− | * [[Template_Tags/comment_author | comment_author]] |
||
− | * [[Template_Tags/comment_author_link | comment_author_link]] |
||
− | * [[Template_Tags/comment_author_email | comment_author_email]] |
||
− | * [[Template_Tags/comment_author_email_link | comment_author_email_link]] |
||
− | * [[Template_Tags/comment_author_url | comment_author_url]] |
||
− | * [[Template_Tags/comment_author_url_link | comment_author_url_link]] |
||
− | * [[Template_Tags/comment_author_IP | comment_author_IP]] |
||
− | * [[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_form_title | comment_form_title]] |
||
− | * [[Template_Tags/comment_author_rss | comment_author_rss]] |
||
− | * [[Template_Tags/comment_text_rss | comment_text_rss]] |
||
− | * [[Function_Reference/get_avatar | get_avatar]] |
||
− | * [[Template_Tags/permalink_comments_rss | permalink_comments_rss]] |
||
− | * [[Template_Tags/comment_reply_link | comment_reply_link]] |
||
− | * [[Template_Tags/cancel_comment_reply_link | cancel_comment_reply_link]] |
||
− | * [[Template Tags/previous_comments_link | previous_comments_link]] |
||
− | * [[Template Tags/next_comments_link | next_comments_link]] |
||
− | * [[Template Tags/paginate_comments_links|paginate_comments_links]] |
||
− | * [[Template Tags/comment_class|comment_class]] |
||
− | |} |
||
− | |||
− | |- valign="top" |
||
− | | width="50%" | |
||
− | |||
− | {| class="widefat" |
||
− | |- style="background:#464646; color:#d7d7d7;" |
||
− | ! '''Post Thumbnail tags''' |
||
− | |- |
||
− | | |
||
− | * [[Template_Tags/has_post_thumbnail | has_post_thumbnail]] |
||
− | * [[Template_Tags/the_post_thumbnail | the_post_thumbnail]] |
||
− | * [[Template_Tags/get_the_post_thumbnail | get_the_post_thumbnail]] |
||
− | * [[Template_Tags/get_post_thumbnail_id | get_post_thumbnail_id]] |
||
− | |} |
||
− | |||
− | | width="50%" | |
||
− | |||
− | {| class="widefat" |
||
− | |- style="background:#464646; color:#d7d7d7;" |
||
− | ! '''Attachment tags''' |
||
− | |- |
||
− | | |
||
− | * [[Function_Reference/is_attachment | is_attachment]] |
||
− | * [[Template_Tags/the_attachment_link | the_attachment_link]] |
||
− | * [[Template_Tags/get_attachment_link | get_attachment_link]] |
||
− | * [[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]] |
||
− | |} |
||
− | |||
− | |- valign="top" |
||
− | | 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]] |
||
− | * [[Template_Tags/single_cat_title | single_cat_title]] |
||
− | * [[Template_Tags/category_description | category_description]] |
||
− | * [[Template_Tags/wp_dropdown_categories | wp_dropdown_categories]] |
||
− | * [[Template_Tags/wp_list_categories | wp_list_categories]] |
||
− | |||
− | |} |
||
− | |||
− | | width="50%" | |
||
− | |||
− | {| class="widefat" |
||
− | |- style="background:#464646; color:#d7d7d7;" |
||
− | ! '''Tag tags''' |
||
− | |- |
||
− | | |
||
− | * [[Template_Tags/the_tags | the_tags]] |
||
− | * [[Template_Tags/tag_description | tag_description]] |
||
− | * [[Template_Tags/single_tag_title | single_tag_title]] |
||
− | * [[Template_Tags/wp_tag_cloud | wp_tag_cloud]] |
||
− | * [[Template_Tags/wp_generate_tag_cloud | wp_generate_tag_cloud]] |
||
− | |} |
||
− | |||
− | |- valign="top" |
||
− | | width="50%" | |
||
+ | ===General tags=== |
||
− | {| class="widefat" |
||
+ | {{Trac|wp-includes/general-template.php}} |
||
− | |- style="background:#464646; color:#d7d7d7;" |
||
− | ! '''Author tags''' |
||
− | |- |
||
− | | |
||
− | * [[Template_Tags/the_author | the_author]] |
||
− | * [[Template_Tags/the_author_link | the_author_link]] |
||
− | * [[Template_Tags/the_author_posts | the_author_posts]] |
||
− | * [[Template_Tags/the_author_posts_link | the_author_posts_link]] |
||
− | * [[Template_Tags/the_author_meta | the_author_meta]] |
||
− | * [[Template_Tags/wp_list_authors | wp_list_authors]] |
||
− | * [[Template_Tags/wp_dropdown_users | wp_dropdown_users]] |
||
− | |} |
||
+ | * [[Function Reference/get_header | get_header()]] |
||
− | | width="50%" | |
||
+ | * [[Function Reference/get_footer | get_footer()]] |
||
+ | * [[Function Reference/get_sidebar | get_sidebar()]] |
||
+ | * [[Function Reference/get_template_part | get_template_part()]] |
||
+ | * [[Function Reference/get_search_form | get_search_form()]] |
||
+ | * [[Function Reference/wp_loginout | wp_loginout()]] |
||
+ | * [[Function Reference/wp_logout_url | wp_logout_url()]] |
||
+ | * [[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=== |
||
− | {| class="widefat" |
||
+ | {{Trac|wp-includes/author-template.php}} |
||
− | |- 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]] |
||
− | * [[Template_Tags/the_modified_time | the_modified_time]] |
||
− | * [[Template_Tags/the_modified_date | the_modified_date]] |
||
− | * [[Template_Tags/the_modified_author | the_modified_author]] |
||
− | * [[Template_Tags/single_month_title | single_month_title]] |
||
− | |} |
||
+ | * [[Function Reference/the_author | the_author()]] |
||
− | |- valign="top" |
||
+ | * [[Function Reference/get_the_author | get_the_author()]] |
||
− | | width="50%" | |
||
+ | * [[Function Reference/the_author_link | the_author_link()]] |
||
+ | * [[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()]] |
||
+ | * [[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=== |
||
− | {| class="widefat" |
||
+ | {{Trac|wp-includes/bookmark-template.php}} and |
||
− | |- style="background:#464646; color:#d7d7d7;" |
||
+ | {{Trac|wp-includes/bookmark.php}} |
||
− | ! '''Edit Link tags''' |
||
+ | * [[Function Reference/wp_list_bookmarks | wp_list_bookmarks()]] |
||
− | |- |
||
+ | * [[Function Reference/get_bookmark | get_bookmark()]] |
||
− | | |
||
+ | * [[Function Reference/get_bookmark_field | get_bookmark_field()]] |
||
− | * [[Template_Tags/edit_post_link | edit_post_link]] |
||
+ | * [[Function Reference/get_bookmarks | get_bookmarks()]] |
||
− | * [[Template_Tags/edit_comment_link | edit_comment_link]] |
||
− | * [[Template_Tags/edit_tag_link | edit_tag_link]] |
||
− | * [[Template_Tags/edit_bookmark_link | edit_bookmark_link]] |
||
− | |} |
||
+ | ===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()]] |
||
− | ! '''Permalink 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/get_permalink | get_permalink]] |
||
+ | * [[Function Reference/single_tag_title | single_tag_title()]] |
||
− | * [[Template_Tags/the_permalink | the_permalink]] |
||
+ | * [[Function Reference/tag_description | tag_description()]] |
||
− | * [[Template_Tags/post_permalink | post_permalink]] |
||
+ | * [[Function Reference/the_tags | the_tags()]] |
||
− | * [[Template_Tags/permalink_anchor | permalink_anchor]] |
||
+ | * [[Function Reference/wp_generate_tag_cloud | wp_generate_tag_cloud()]] |
||
− | * [[Template_Tags/permalink_single_rss | permalink_single_rss]] |
||
+ | * [[Function Reference/wp_tag_cloud | wp_tag_cloud()]] |
||
− | |} |
||
+ | * [[Function Reference/term_description | term_description()]] |
||
+ | * [[Function Reference/single_term_title | single_term_title()]] |
||
+ | * [[Function Reference/get_the_term_list | get_the_term_list()]] |
||
+ | * [[Function Reference/the_terms | the_terms()]] |
||
+ | * [[Function Reference/the_taxonomies | the_taxonomies()]] |
||
+ | ===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()]] |
||
− | ! '''Links Manager 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/wp_list_bookmarks | wp_list_bookmarks]] |
||
+ | * [[Function Reference/comment_author_rss | comment_author_rss()]] |
||
− | * [[Function_Reference/get_bookmarks | get_bookmarks]] |
||
+ | * [[Function Reference/comment_author_url | comment_author_url()]] |
||
− | * [[Function_Reference/get_bookmark | get_bookmark]] |
||
+ | * [[Function Reference/comment_author_url_link | comment_author_url_link()]] |
||
− | * [[Function_Reference/get_bookmark_field | get_bookmark_field]] |
||
+ | * [[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()]] |
||
− | ! '''Title 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/wp_title | wp_title]] |
||
+ | * [[Function Reference/posts_nav_link | posts_nav_link()]] |
||
− | * [[Template_Tags/single_post_title | single_post_title]] |
||
+ | * [[Function Reference/previous_image_link | previous_image_link()]] |
||
− | * [[Template_Tags/single_cat_title | single_cat_title]] |
||
+ | * [[Function Reference/previous_post_link | previous_post_link()]] |
||
− | * [[Template_Tags/single_tag_title | single_tag_title]] |
||
+ | * [[Function Reference/previous_posts_link | previous_posts_link()]] |
||
− | * [[Template_Tags/single_month_title | single_month_title]] |
||
+ | * [[Function Reference/single_post_title | single_post_title()]] |
||
− | * [[Template_Tags/the_search_query | the_search_query]] |
||
+ | * [[Function Reference/sticky_class | sticky_class()]] |
||
− | |} |
||
+ | * [[Function Reference/the_category | the_category()]] |
||
+ | * [[Function Reference/the_category_rss | the_category_rss()]] |
||
+ | * [[Function Reference/the_content | the_content()]] |
||
+ | * [[Function Reference/the_content_rss | the_content_rss()]] |
||
+ | * [[Function Reference/the_excerpt | the_excerpt()]] |
||
+ | * [[Function Reference/the_excerpt_rss | the_excerpt_rss()]] |
||
+ | * [[Function Reference/the_ID | the_ID()]] |
||
+ | * [[Function Reference/the_meta | the_meta()]] |
||
+ | * [[Function Reference/the_tags | the_tags()]] |
||
+ | * [[Function Reference/the_title | the_title()]] |
||
+ | * [[Function Reference/get_the_title | get_the_title()]] |
||
+ | * [[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()]] |
||
− | ! '''Query tags''' |
||
+ | * [[Function Reference/get_the_post_thumbnail | get_the_post_thumbnail()]] |
||
− | |- |
||
− | | |
||
− | * [[Template_Tags/get_posts | get_posts]] |
||
− | * [[Template_Tags/query_posts | query_posts]] |
||
− | |} |
||
+ | ===Navigation Menu tags=== |
||
− | |} |
||
+ | {{Trac|wp-includes/nav-menu-template.php}} |
||
+ | * [[Function Reference/wp_nav_menu | wp_nav_menu()]] |
||
+ | * [[Function Reference/walk_nav_menu_tree | walk_nav_menu_tree()]] |
||
− | == |
+ | ==Resources== |
+ | * [[:Category:Template Tags|Template Tags Category]] |
||
− | * [http://guff.szub.net/wordpress/template-tags/ szub.net: WordPress 1.5 Template Tags reference page] |
||
− | * [http://solutoire.com/tagstention/ Solutoire.com: Template Tag Dreamweaver extension (TAGStention)] |
||
− | * [http://ekinertac.com/wp-content/uploads/2009/07/Wordpress-Cheat-Sheet.pdf Template Tags Cheat Sheet (pdf)] |
||
+ | ==External Resources== |
||
[[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