Skip Navigation

[Resolved] Need to import SELECT field content

This support ticket is created 2 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 6 replies, has 2 voices.

Last updated by ashodK 2 years, 2 months ago.

Assisted by: Luo Yang.

Author
Posts
#2477669
2022-10-17_11-36-52.jpg
2022-10-17_11-36-30.jpg

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

#2477989

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

#2478017

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

#2478037

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/

#2479293

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?

#2479663

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.

#2482547

My issue is resolved now. Thank you!