Function: wp_update_category

wp_update_category( array $catarr )

Aliases wp_insert_category() with minimal args.

Shortcut: wuc

You can use above key combination to trigger the associated snippet for this function in the WordPress Snippets for Visual Studio Code extension. You can also use this shortcut to search for this function on this website.

If you want to update only some fields of an existing category, call this function with only the new values set inside $catarr.

Parameters

Name Type(s) Default Value Description
$catarr array

The 'cat_ID' value is required. All other keys are optional.

Returns

integer | boolean

The ID number of the new or updated Category on success. Zero or FALSE on failure.

WordPress Developer Newsletter

Stay informed of new chapter releases, important WordPress API updates and more.