WordPress at Your Fingertips

is_admin() WP 1.0

Whether the current request is for an administrative interface page.

Does not check if the user is an administrator; use current_user_can() for checking roles and capabilities.

For more information on this and similar theme functions, check out the Conditional Tags article in the Theme Developer Handbook.

1 time — 0.000014 sec (very fast) | 50000 times — 0.01 sec (speed of light) | PHP 7.0.14, WP 4.7

No Hooks.


true|false. True if inside WordPress administration interface, false otherwise.




  • Global. WP_Screen. $current_screen WordPress current screen object.


Since 1.5.1 Introduced.

Code of is_admin() WP 5.8.1

function is_admin() {
	if ( isset( $GLOBALS['current_screen'] ) ) {
		return $GLOBALS['current_screen']->in_admin();
	} elseif ( defined( 'WP_ADMIN' ) ) {
		return WP_ADMIN;

	return false;

Conditional tags (page type and request)

Conditional tags (all)

Admin Menu

Main Functions

No comments
    Log In