• Hello,

    i’d like to create posts from an xml feed and want to multiple main and subcategories to each post. with the function wp_insert_post it is only possible to add categories by their id.

    my question: is it possible to create a category (if it doesn’t exist) and get back the ID of the category in a variable?

    thanks in advance!

    Greetings from germany.

  • The topic ‘create categories with php in a script?’ is closed to new replies.