category_exists
category_exists ( $cat_name, $category_parent = null )
Parameters:- (int|string) cat_name Category name.
- (int) category_parent Optional. ID of parent category.
See:Returns:- (string|null) Returns the category ID as a numeric string if the pairing exists, null if not.
Defined at: - Introduced in WordPress: 2.0.0
- Deprecated in WordPress: —
Description
Checks whether a category exists.