I have a huge excel database of locations which I want to add as terms to my current taxonomy.
However, I don’t know the best way to do this, as inserting manually could take weeks.
I have looked at: http://codex.wordpress.org/Function_Reference/wp_insert_term
but not sure how to use it correctly.
My Taxonomy is called: location
I would like to add the following example terms:
London, Glasgow, Bristol, Bournemouth
Is this possible?
Additionally, if there is hierarchical relationships, is this also possible to add automatically?
For instance: London (Parent), Kensington (child of london).
You’d write a script to loop through a file you created with the data, and process each line one at a time. Inside the loop you’d have code like the following. You would, of course, replace my example values Scotland, Glasgow, its description and its slug with variables representing the data for the row being processed.
This commercial plugin GD Custom
Posts And Taxonomies Tools includes a feature to import / export taxonomy tags. It might be worth the cost, depending on how you value your time.