wp_create_category


wp_create_category ( $cat_name, $parent = 0 )

Parameters:
  • (int|string) $cat_name
  • (int) $parent
Returns:
  • (int|WP_Error)
Defined at:

Description

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

Related Functions

wp_create_categories, wp_delete_category, wp_update_category, wp_create_term, wp_insert_category

Top Google Results

User discussions

wpseek mobile