Template Tags
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.
For further information on template tags and templates in general, see the following:
- WordPress: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)
- WordPress:Include Tags (additional tags not shown here, related to including one Template file within another)
- WordPress:Conditional Tags (more additional tags not shown here, related to making your Templates more flexible with options)
- WordPress:Templates (a comprehensive list of Template, Theme, and Tag resources)
- WordPress: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 WordPress:Contributing to WordPress for help and guidelines on editing Codex pages.
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").
Author tags
- the_author
- the_author_description
- the_author_login
- the_author_firstname
- the_author_lastname
- the_author_nickname
- the_author_ID
- the_author_email
- the_author_url
- the_author_link (Version 2.1)
the_author_icq(Deprecated)- the_author_aim
- the_author_yim
the_author_msn(Deprecated)- the_author_posts
- the_author_posts_link
list_authors(Deprecated)- wp_list_authors
Category tags
- the_category
- the_category_rss
the_category_ID(Deprecated)the_category_head(Deprecated)- single_cat_title
- category_description
- wp_dropdown_categories (Version 2.1)
dropdown_cats(Deprecated in 2.1)- wp_list_categories (Version 2.1)
list_cats(Deprecated in 2.1)wp_list_cats(Deprecated in 2.1)- in_category
- get_category_parents
- get_the_category
- get_category_link
Comment tags
- comments_number
- comments_link
- comments_rss_link
- comments_popup_script
- comments_popup_link
- comment_ID
- comment_author
- comment_author_IP
- comment_author_email
- comment_author_url
- comment_author_email_link
- comment_author_url_link
- comment_author_link
- comment_type
- comment_text
- comment_excerpt
- comment_date
- comment_time
- comment_author_rss
- comment_text_rss
- comment_link_rss
- permalink_comments_rss
Date and Time tags
- the_date_xml
- the_date
- the_time
- the_modified_date (Version 2.1)
- the_modified_time
- get_the_time (Version 1.5)
- single_month_title
- get_calendar
the_weekday(Deprecated)the_weekday_date(Deprecated)
General tags
- bloginfo
- bloginfo_rss
- get_bloginfo
- get_bloginfo_rss
- wp_title
- wp_get_archives
get_archives(Deprecated in 2.1)- get_calendar
- get_posts
- wp_list_pages (Version 1.5)
- wp_dropdown_pages
- wp_loginout (Version 1.5)
- wp_register (Version 1.5)
- query_posts (Version 1.5)
- rss_enclosure (Version 1.5)
- the_search_query (Version 2.1)
Geo tags
Geo features were moved to a plugin implementation with WordPress 1.5. Tags in parentheses are the plugin version.
- print_Lat (the_Lat)
- print_Lon (the_Lon)
- print_UrlPopNav (the_UrlPopNav)
- print_AcmeMap_Url (the_AcmeMap_Url)
- print_GeoURL_Url (the_GeoURL_Url)
- print_GeoCache_Url (the_GeoCache_Url)
- print_MapQuest_Url (the_MapQuest_Url)
- print_SideBit_Url (the_SideBit_Url)
- print_DegreeConfluence_Url (the_DegreeConfluence_Url)
- print_TopoZone_Url (the_TopoZone_Url)
- print_FindU_Url (the_FindU_Url)
- print_MapTech_Url (the_MapTech_Url)
Link tags
- edit_post_link
- edit_comment_link
- wp_link_pages
link_pages(Deprecated in 2.1)- get_year_link
- get_month_link
- get_day_link
- previous_posts_link
- next_posts_link
Links Manager tags
get_links_list(Deprecated in 2.3)wp_get_links(Deprecated in 2.3)get_links(Deprecated in 2.3)wp_get_linksbyname(Deprecated in 2.1)get_linksbyname(Deprecated in 2.1)- wp_list_bookmarks (Version 2.1)
- get_bookmarks (Version 2.1)
Permalink tags
Post tags
While in WordPress:The Loop, these values can be accessed through the $post object.
- the_ID
- the_title
- the_title_attribute (Version 2.3)
- single_post_title
- the_title_rss
- the_content
- the_content_rss
- the_excerpt
- the_excerpt_rss
- previous_post_link
previous_post(Deprecated)- next_post_link
next_post(Deprecated)- posts_nav_link
- the_meta
- the_tags (Version 2.3)
Tag tags
- wp_tag_cloud (Version 2.3)
- the_tags (Version 2.3)
- get_the_tags (Version 2.3)
- get_the_tag_list (Version 2.3)
- single_tag_title (Version 2.3)