• Resolved ecstatic

    (@ecstatic)


    I’m creating posts by taking data from spreadsheets, coverting to .csv, and importing into the datatbase posts table. I’ve got everything working fine, except that I can’t see how to make the new imported posts belong to categories automatically. There’s hundreds so the last thing I want is to manually edit them. When I look at the values in the categories bit of the posts table of another of my blogs all I see is zeros, despite the fact that all of the posts are categorised. I have no query language skills at all, all I can do is import spreadsheets. Any ideas please?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The post_category column in the posts table is archaic (pre-1.2). It was dropped from use when were able to assign a post to multiple categories.

    Post <> category is now set in the term_relationships table (post ID = object_id column, category ID = term_taxonomy_id).

    Thread Starter ecstatic

    (@ecstatic)

    Thanks, perfect answer!

    (If anyone else has the same query I’ll mention to update the count value in wp_term_taxonomy so that the category list on the main page is updated to reflect the new posts. Or at least I hope that’s how it’s supposed to be.)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Importing posts via .csv – categories’ is closed to new replies.