Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

User talk:Trungtamgiasu

The files of WordPress define many useful PHP functions. Some of the functions, known as Template Tags, are defined especially for use in WordPress Themes. There are also some functions related to actions and filters (the Plugin API), which are therefore used primarily for developing Plugins. The rest are used to create the core WordPress functionality.

Many of the core WordPress functions are useful to Plugin and Theme developers. So, this article lists most of the core functions, excluding Template Tags. At the bottom of the page, there is a section listing other resources for finding information about WordPress functions. In addition to this information, the WordPress phpdoc site details all the WordPress functions by version since 2.6.1.

You can help make this page more complete!

Here are some things you can do to help:

  • Add documentation to un-documented functions, by creating sub-pages or at least by adding short comments in the lists below. If you create a subpage for a function, please include information and examples of usage of that function, if possible, per the examples found in Template Tags.
  • 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 Bookmarks Functions


Custom Post Type

Post insertion/removal


Custom Fields (postmeta)





Category, Tag and Taxonomy Functions


Category Creation



User and Author Functions

Admins, Roles and Capabilities

Users and Authors

User meta

User insertion/removal

Login / Logout

Feed Functions

HTTP API Functions

Comment, Ping, and Trackback Functions

Comments Loop

Comments Pagination

Action, Filter, and Plugin Functions

Filters (Reference)

Actions (Reference)

Plugins (Reference)

Widgets (Reference)

Settings (Reference)

Shortcodes (Reference)

Theme-Related Functions

Include functions

Other functions

Formatting Functions

Miscellaneous Functions

Time/Date Functions




Admin Menu Functions

Toolbar Functions

Form Helpers

Nonces and Referers (Security)



Cron (Scheduling)

Conditional Tags Index

Script and Style Registration



Multisite functions

As of v3.0, WordPress includes WPMU functionality. Old WPMU functions reference can be found at http://codex.wordpress.org/WPMU_Functions (deprecated page).

Multisite administration Functions

These functions are found in file wp-admin/includes/ms.php (since 3.0.0).

Multisite Functions

Site/blog functions that work with the blogs table and related data, found in file wp-includes/ms-blogs.php (since 3.0.0).

Defines constants and global variables that can be overridden, generally in wp-config.php, found in file wp-includes/ms-default-constants.php (since 3.0.0).

Multisite WordPress API, found in file wp-includes/ms-functions.php (since 3.0.0).

These functions are needed to load Multisite, found in file wp-includes/ms-load.php (since 3.0.0).

Official and Unofficial References