I have a script that's making a custom post from a .csv file
Their is a row called Category where i set the post category, but the script just sets the category to uncatagorized. it used to work on old wordpress im sure
the code is
$my_post['post_category'] = prep($row['category']);
anybody know a fix for this?
No one's going to be able to help you without seeing the script, but it looks like it relies on the old category system, which hasn't been used for a couple years. Your script probably needs to be substantially rewritten.
Change:
$my_post['post_category'] = prep($row['category']);
to:
$my_post['post_category'] = array(prep($row['category']));