WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] How to programmatically add NEW categories?

[Resolved] How to programmatically add NEW categories?

  • Hi, I have written a script that takes an XML feed of some news, and inserts each news story as a post into WordPress using wp_insert_post().

    Each of these news stories has a category that I would like to add to WordPress also.

    My question is, how can I create a NEW category and assign the post to that category using wp_insert_post() (or any other function)?

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] How to programmatically add NEW categories?’ is closed to new replies.