Title: wp_get_ability_category
Published: February 24, 2026

---

# wp_get_ability_category( string $slug ): 󠀁[WP_Ability_Category](https://developer.wordpress.org/reference/classes/wp_ability_category/)󠁿|null

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/wp_get_ability_category/?output_format=md#description)
    - [See also](https://developer.wordpress.org/reference/functions/wp_get_ability_category/?output_format=md#see-also)
 * [Parameters](https://developer.wordpress.org/reference/functions/wp_get_ability_category/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/wp_get_ability_category/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/wp_get_ability_category/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/wp_get_ability_category/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/wp_get_ability_category/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/wp_get_ability_category/?output_format=md#wp--skip-link--target)

Retrieves a registered ability category.

## 󠀁[Description](https://developer.wordpress.org/reference/functions/wp_get_ability_category/?output_format=md#description)󠁿

Returns the ability category instance for inspection or use. The instance provides
access to the ability category’s configuration and metadata.

Example:

    ```php
    // Prints information about a registered ability category.
    $ability_category = wp_get_ability_category( 'content-management' );
    if ( $ability_category ) {
        echo $ability_category->get_label() . ': ' . $ability_category->get_description();
    }
    ```

### 󠀁[See also](https://developer.wordpress.org/reference/functions/wp_get_ability_category/?output_format=md#see-also)󠁿

 * [WP_Ability_Categories_Registry::get_registered()](https://developer.wordpress.org/reference/classes/WP_Ability_Categories_Registry/get_registered/)
 * [wp_has_ability_category()](https://developer.wordpress.org/reference/functions/wp_has_ability_category/)
 * [wp_get_ability_categories()](https://developer.wordpress.org/reference/functions/wp_get_ability_categories/)

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/wp_get_ability_category/?output_format=md#parameters)󠁿

 `$slug`stringrequired

The slug of the ability category.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/wp_get_ability_category/?output_format=md#return)󠁿

 [WP_Ability_Category](https://developer.wordpress.org/reference/classes/wp_ability_category/)
|null The ability category instance, or `null` if not registered.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/wp_get_ability_category/?output_format=md#source)󠁿

    ```php
    function wp_get_ability_category( string $slug ): ?WP_Ability_Category {
    	$registry = WP_Ability_Categories_Registry::get_instance();
    	if ( null === $registry ) {
    		return null;
    	}

    	return $registry->get_registered( $slug );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/abilities-api.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/abilities-api.php#L576)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/abilities-api.php#L576-L583)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/wp_get_ability_category/?output_format=md#related)󠁿

| Uses | Description | 
| [WP_Ability_Categories_Registry::get_instance()](https://developer.wordpress.org/reference/classes/wp_ability_categories_registry/get_instance/)`wp-includes/abilities-api/class-wp-ability-categories-registry.php` |

Utility method to retrieve the main instance of the registry class.

  |

| Used by | Description | 
| [WP_REST_Abilities_V1_Categories_Controller::get_item()](https://developer.wordpress.org/reference/classes/wp_rest_abilities_v1_categories_controller/get_item/)`wp-includes/rest-api/endpoints/class-wp-rest-abilities-v1-categories-controller.php` |

Retrieves a specific ability category.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/wp_get_ability_category/?output_format=md#changelog)󠁿

| Version | Description | 
| [6.9.0](https://developer.wordpress.org/reference/since/6.9.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_get_ability_category%2F)
before being able to contribute a note or feedback.