WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] subcategory creation from within a plugin (2 posts)

  1. AfterDarkMike
    Member
    Posted 2 years ago #

    I have several blogs with hundreds of categories/subcategories and got tired of manually creating them by hand. Though there are a couple bulk category plugins - there are none that worked exactly as I wanted.

    I build the front end and the code to process the uploaded file. All appears to work - the subcategories are added to the selected category in the database and the total pages of categories increase but they don't show on the category page - though they do in the category box when creating a post.

    Now, if the category I've selected as a parent already has at least one subcategory, everything works.

    Obviously there is another database call I need to make to create a subcategory relationship?

    Any thoughts would be great.

    Thanks.

  2. AfterDarkMike
    Member
    Posted 2 years ago #

    Actually nvm. I diff'd a before and after database dump and found the 'category_children' option in the database.

    I just deleted it after inserting the new subcategories and everything seems to work.

Topic Closed

This topic has been closed to new replies.

About this Topic