wp_create_category


wp_create_category ( $cat_name, $category_parent = 0 )

Parameters:
  • (int|string) cat_name Category name.
  • (int) category_parent Optional. ID of parent category.
Returns:
  • (int|WP_Error)
Defined at:

Description

Adds a new category to the database if it does not already exist.

Related Functions

wp_create_categories, wp_update_category, wp_delete_category, wp_create_term, wp_insert_category

Top Google Results

User discussions

wpseek mobile