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

Creates categories for the given post.

Related Functions

wp_create_category, wp_list_categories, get_categories, wp_create_term, wp_get_post_categories

Top Google Results

User discussions

wpseek mobile