import list of locations in a SELECT field in a custom post type. I have too many, I don't want to add them 1 by 1.
I'd also like to know how to sort them after they are imported.
I have many fields like this and will need a way to import all of them.
Once I figure out how to do 1, I think the rest would be more straightforward.
Thanks
Hello,
You can follow our document to import post data:
https://toolset.com/course-lesson/how-to-import-content-into-wordpress-using-csv/
One thing need to pay attention in Toolset side, if the custom select field is created with Toolset Types plugin, you need to add prefix "wpcf-" before the field slug, for example:
Custom field "location", you need to use "wpcf-location" in the CSV file as field slug.
More help:
https://toolset.com/documentation/customizing-sites-using-php/functions/
when you are accessing custom fields through native WordPress functions, you need to prepend the wpcf- prefix to the slug
I don't want to update my posts
I just want to import the custom types info
these guides are all showing how to update post data, not importing fields to field groupd
I assume you are going to import the custom select options dynamically.
If it is, there isn't such kind built-in feature within Toolset plugins.
In my opinion, for such kind of field "Location", you might need to change/add the options in the future, so you can setup it as a custom taxonomy:
https://toolset.com/course-lesson/creating-a-custom-taxonomy/
So you can import taxonomy terms easily, for example:
hidden link
Here is a document about the difference between custom field and taxonomy:
https://toolset.com/course-lesson/using-custom-fields-vs-taxonomy/
not import them dynamically.
I would say to import the select field options.
Instead of creating them 1 by 1.
Example:
I have 150 car makes
I have 50 car models
I have 100 car lines
All are select fields
Instead of typing them one by one from the toolset menu, can I import them from CSV (without updating any posts persay?
No, there isn't such kind built-in feature within Toolset plugins.
You can add a feature request for it:
https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/
Our developers will evaluate it.
As I mentioned above, you can consider to use custom taxonomy instead of custom select fields.
My issue is resolved now. Thank you!