wp_insert_category Wordpress function


Updates an existing Category or creates a new Category.



(mixed) $catarr See defaults below. Set 'cat_ID' to a non-zero value to update an existing category. The 'taxonomy' key was added in 3.0.0.
(bool) $wp_error Optional, since 2.5.0. Set this to true if the caller handles WP_Error return values.

Return Type:

(int|object) The ID number of the new or updated Category on success. Zero or a WP_Error on failure, depending on param $wp_error.

Define At:


Wordpress Reference URL:


0 Flares Facebook 0 Google+ 0 0 Flares ×
Posted in: Wordpress functions
0 Flares Facebook 0 Pin It Share 0 Google+ 0 0 Flares ×