wp_create_categories


wp_create_categories ( $categories, $post_id = '' )

Parameters:
  • (string[]) categories Array of category names to create.
  • (int) post_id Optional. The post ID. Default empty.
Returns:
  • (int[]) Array of IDs of categories assigned to the given post.
Defined at:

Description

Create categories for the given post.

Related Functions

wp_create_category, wp_list_categories, wp_get_post_categories, wp_create_term, wp_set_post_categories

Top Google Results

User discussions

wpseek mobile