• Resolved lucawater

    (@lucawater)


    I created a couple of custom taxonomies. Each term has a couple of custom fields(created with Advanced Custom Fields). I am going to have a lot of terms(football teams), and I don’t want to edit them all manually in the wordpress backend.

    I know you can add terms with wp_insert_term. The thing is, I cannot add the custom fields to that function.

    Is there some way where I can(preferably using csv files) import terms with those custom fields?

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • I know there are some import plugins who support ACF, but those add-ons are probably not free.

    Or you can go scripting and call after wp_insert_term the update field function to add those fields.

    ( Last option is to directly add those to the database but you’ll have to research how ACF stores those )

    Thread Starter lucawater

    (@lucawater)

    Hi Bas!

    Thanks for your answer!

    I managed to get a solution:
    – I read the csv file with php’s fgetcsv
    – use wp_insert_term to import terms
    – use update_field to import custom fields

    If anyone has any questions on how to work this out let me know and i’ll post my code!

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

The topic ‘Import term content’ is closed to new replies.