• lobas

    (@lobas)


    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?

Viewing 3 replies - 1 through 3 (of 3 total)
  • sojweb

    (@sojweb)

    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.

    Thread Starter lobas

    (@lobas)

    sojweb

    (@sojweb)

    Change:

    $my_post['post_category'] = prep($row['category']);

    to:

    $my_post['post_category'] = array(prep($row['category']));

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘post_category NOT WORKING’ is closed to new replies.