I created an options page and registered fields via PHP on my functions.php. Now, I would like to import a CSV file to update my fields (several select fields and repeaters. Admin select an option on the first select field, then a second option on the second select field, and then complete repeaters. Every fields have conditional rules).
I find the WP All Import plugin with ACF extension, but it seem we can only import data on post/page but not options page.
Do you have a solution ? Maybe with update_field() ?
There are no tools available that can be used to import options.
There are several ways that you can work around this.
The first is to use some type of custom post type instead of options.
The second is that you can define a post ID to use for your options. This is complicated in a way. What you need to do is have a page or post of any kind. When creating the options page you set this posts ID as the post_id for the options page. Then you always import custom fields for the options of this post and you use this post ID instead of “options” when getting the options values from ACF.
Overall, I would probably go with figuring out how to use a custom post type for this data rather than options.
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users