Professional Documents
Culture Documents
org
Home Page
Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!
WordPress Lessons
Working with
WordPress
Languages: English • Español • • ﻓﺎرﺳﯽFrançais • Italiano • ქართული • • Português do Brasil • Русский • Türkçe • • עברית ( )• ( ) • (Add your language)
Design and Layout
The files of WordPress define many useful PHP functions. Some of the functions, known as Template Tags, Advanced Topics
Contents
are defined especially for use in WordPress Themes. There are also some functions related to actions and Troubleshooting
filters (the Plugin API), which are therefore used primarily for developing Plugins. The rest are used to 1 Functions by category
Developer Docs
create the core WordPress functionality. 1.1 Post, Custom Post Type, Page,
Attachment and Bookmarks Functions About WordPress
Many of the core WordPress functions are useful to Plugin and Theme developers. So, this article lists most 1.2 Category, Tag and Taxonomy
of the core functions, excluding Template Tags. At the bottom of the page, there is a section listing other Functions Codex Resource
resources for finding information about WordPress functions. In addition to this information, the WordPress 1.3 User and Author Functions Community portal
Code Reference site details all the WordPress functions by version since 2.6.1. 1.4 Feed Functions
Current events
1.5 HTTP API Functions
1.6 Comment, Ping, and Trackback Recent changes
You can help make this page more complete!
Functions Random page
1.7 Action, Filter, and Plugin Functions
Here are some things you can do to help: Help
1.8 Theme-Related Functions
1.9 Formatting Functions
Add documentation to un-documented functions, by creating sub-pages or at least by adding short
1.10 Miscellaneous Functions
comments in the lists below. If you create a subpage for a function, please include information and
1.11 Multisite functions
examples of usage of that function, if possible, per the examples found in Template Tags.
2 Official and Unofficial References
List more functions here, following the category structure.
Correct errors by moving functions to better categories where appropriate, and of course fixing typos.
Note: that it is OK for a function to appear in more than one category.
Read Contributing to WordPress to find out more about how you can contribute to the effort!
Functions by category
Post, Custom Post Type, Page, Attachment and Category, Tag and Taxonomy Functions
Bookmarks Functions
Categories
Posts
cat_is_ancestor_of
get_adjacent_post get_all_category_ids (deprecated)
get_boundary_post get_ancestors
get_children get_cat_ID
get_extended get_cat_name
get_next_post get_categories
get_next_posts_link get_category
next_posts_link get_category_by_path
get_permalink get_category_by_slug
the_permalink get_the_category_by_ID
get_the_excerpt get_the_category_list
the_excerpt get_category_link
get_the_post_thumbnail get_category_parents
get_post get_the_category
get_post_field single_cat_title
get_post_ancestors in_category
get_post_mime_type is_category
get_post_status the_category
get_post_format wp_category_checklist
set_post_format wp_dropdown_categories
get_edit_post_link wp_list_categories
get_delete_post_link
get_previous_post Category Creation
get_previous_posts_link
previous_posts_link wp_create_category
get_posts wp_delete_category
have_posts wp_insert_category
is_post (deprecated)
is_single Tags
is_sticky
get_the_ID get_tag
the_ID get_tag_link
the_post get_tags
wp_get_recent_posts get_the_tag_list
wp_get_single_post (deprecated) get_the_tags
has_post_thumbnail has_tag
has_excerpt is_tag
has_post_format the_tags
single_tag_title
Custom Post Status tag_description
wp_generate_tag_cloud
register_post_status wp_tag_cloud
register_post_type get_object_taxonomies
is_post_type_archive get_edit_term_link
post_type_archive_title get_edit_term_link
add_post_type_support get_taxonomy
remove_post_type_support get_taxonomies
post_type_supports get_term
set_post_type get_the_term_list
post_type_exists get_term_by
get_post_type the_terms
get_post_types get_the_terms
get_post_type_archive_link get_term_children
get_post_type_object get_term_link
get_post_type_capabilities get_terms
get_post_type_labels is_taxonomy (deprecated)
is_post_type_hierarchical is_tax
is_taxonomy_hierarchical
Post insertion/removal is_term (deprecated)
taxonomy_exists
wp_delete_post term_exists
wp_insert_post register_taxonomy
wp_publish_post register_taxonomy_for_object_type
wp_trash_post wp_get_object_terms
wp_update_post wp_remove_object_terms
wp_set_object_terms
Pages wp_insert_term
wp_update_term
get_all_page_ids wp_delete_term
get_ancestors wp_terms_checklist
get_page (deprecated)
get_page_link
get_page_by_path
get_page_by_title
get_page_children
get_page_hierarchy
get_page_uri
get_pages
is_page
page_uri_index (method of class WP_Rewrite)
wp_link_pages
wp_list_pages
wp_page_menu
wp_dropdown_pages
add_post_meta
delete_post_meta
get_post_custom
get_post_custom_keys
get_post_custom_values
get_post_meta
update_post_meta
register_meta
Attachments
get_attached_file
image_resize (deprecated)
image_edit_before_change (ported to WP_Image_Editor object)
is_attachment
is_local_attachment
set_post_thumbnail
update_attached_file
wp_attachment_is_image
wp_create_thumbnail (deprecated)
wp_insert_attachment
wp_delete_attachment
wp_get_attachment_image
wp_get_attachment_link
wp_get_attachment_image_src
wp_get_attachment_metadata
wp_get_attachment_thumb_file
wp_get_attachment_thumb_url
wp_get_attachment_url
wp_check_for_changed_slugs
wp_count_posts
wp_get_mime_types
wp_mime_type_icon
wp_generate_attachment_metadata
wp_prepare_attachment_for_js
wp_update_attachment_metadata
Bookmarks
get_bookmark
get_bookmarks
wp_list_bookmarks
Terms
wp_get_post_categories
wp_set_post_categories
wp_get_post_tags
wp_set_post_tags
wp_get_post_terms
wp_set_post_terms
wp_count_terms
has_term
is_object_in_term
Others
add_meta_box
remove_meta_box
get_the_ID
the_ID
get_the_author
the_author
get_the_author_posts
get_the_content
the_content
get_the_title
the_title
the_title_attribute
wp_trim_excerpt
wp_get_post_revision
wp_get_post_revisions
wp_is_post_revision
paginate_links
User meta
add_user_meta
delete_user_meta
get_user_meta
update_user_meta
get_the_author_meta
User insertion/removal
wp_create_user
wp_delete_user
wp_insert_user
wp_update_user
Login / Logout
is_user_logged_in
wp_login_form
wp_signon
wp_logout
wp_loginout
wp_logout_url
HTTP API Functions
wp_remote_get
wp_remote_retrieve_body
wp_get_http_headers
wp_remote_fopen
Comment, Ping, and Trackback Functions Action, Filter, and Plugin Functions
add_ping Filters (Reference)
add_comment_meta
check_comment has_filter
comment_text add_filter
comment_form apply_filters
comments_number apply_filters_ref_array
discover_pingback_server_uri current_filter
delete_comment_meta merge_filters
do_all_pings remove_filter
do_enclose remove_all_filters
do_trackbacks
generic_ping Actions (Reference)
get_approved_comments
get_avatar has_action
get_comment add_action
get_comment_text do_action
get_comment_meta do_action_ref_array
get_comments did_action
wp_list_comments remove_action
get_enclosed remove_all_actions
get_lastcommentmodified
get_pung Plugins (Reference)
get_to_ping
have_comments plugin_basename
get_comment_author plugins_url
is_trackback get_plugin_data
pingback get_admin_page_title
privacy_ping_filter plugin_dir_path
sanitize_comment_cookies register_activation_hook
trackback register_deactivation_hook
trackback_url menu_page_url
trackback_url_list is_plugin_active
update_comment_meta is_plugin_active_for_network
weblog_ping is_plugin_inactive
wp_allow_comment is_plugin_page
wp_count_comments add_contextual_help (deprecated)
wp_delete_comment get_plugins
wp_filter_comment
wp_get_comment_status Widgets (Reference)
wp_get_current_commenter
wp_insert_comment is_active_widget
wp_new_comment register_widget
wp_set_comment_status the_widget
wp_throttle_comment_flood unregister_widget
wp_update_comment wp_add_dashboard_widget
wp_update_comment_count wp_convert_widget_settings
wp_update_comment_count_now wp_get_sidebars_widgets
wp_get_widget_defaults
Comments Loop wp_register_sidebar_widget
wp_register_widget_control
comment_class wp_set_sidebars_widgets
comment_ID wp_unregister_sidebar_widget
comment_author wp_unregister_widget_control
comment_date wp_widget_description
comment_time
get_comment_date
get_comment_time Settings (Reference)
Comments Pagination register_setting
unregister_setting
paginate_comments_links settings_fields
previous_comments_link do_settings_fields
next_comments_link do_settings_sections
get_comment_pages_count add_settings_field
add_settings_section
add_settings_error
get_settings_errors
settings_errors
Shortcodes (Reference)
add_shortcode
do_shortcode
do_shortcode_tag
get_shortcode_regex
remove_shortcode
remove_all_shortcodes
shortcode_atts
shortcode_parse_atts
strip_shortcodes
comments_open
has_nav_menu
has_tag
in_category
is_404
is_admin
is_archive
is_attachment
is_author
is_category
is_comments_popup
is_customize_preview
is_date
is_day
is_feed
is_front_page
is_home
is_month
is_page
is_page_template
is_paged
is_preview
is_search
is_single
is_singular
is_sticky
is_tag
is_tax
is_time
is_trackback
is_year
pings_open
wp_dequeue_script
wp_dequeue_style
wp_deregister_script
wp_deregister_style
wp_enqueue_script
wp_enqueue_style
wp_localize_script
wp_register_script
wp_register_style
wp_script_is
wp_style_is
sql
get_tax_sql
get_meta_sql
get_posts_by_author_sql
Miscellaneous
add_editor_style
add_query_arg
add_rewrite_rule
admin_url
bool_from_yn
cache_javascript_headers
capital_P_dangit
clean_blog_cache
content_url
do_robots
flush_rewrite_rules
get_bloginfo
get_num_queries
get_post_stati
get_post_statuses
get_query_var
home_url
includes_url
is_blog_installed
is_main_site
is_main_query
is_multisite
is_ssl
is_wp_error
log_app
make_url_footnote (deprecated)
network_admin_url
network_home_url
network_site_url
nocache_headers
plugin_dir_url
query_posts
remove_query_arg
rewind_posts
setup_postdata
site_url
status_header
unzip_file
validate_file
validate_file_to_edit
wp
wp_cache_set
wp_cache_get
wp_cache_reset (deprecated)
wp_check_filetype
wp_clearcookie (deprecated)
wp_die
wp_editor
wp_footer
wp_get_cookie_login (deprecated)
wp_get_image_editor
wp_get_installed_translations
wp_hash
wp_handle_sideload
wp_head
wp_install_defaults
wp_is_mobile
wp_mail
wp_mkdir_p
wp_new_user_notification
wp_password_change_notification
wp_notify_moderator
wp_notify_postauthor
wp_parse_args
wp_redirect
wp_reset_postdata
wp_reset_query
wp_salt
wp_safe_redirect
wp_set_auth_cookie
wp_strip_all_tags
wp_upload_bits
wp_upload_dir
wp_list_pluck
wp_text_diff
post_submit_meta_box
wp_max_upload_size
Categories:
Advanced Topics
Functions
WordPress Development
About Support
Blog Developers
Hosting Get Involved
Donate Learn
Showcase WordCamp
Plugins WordPress.TV
Themes BuddyPress
Ideas bbPress
WordPress.com Follow