-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Writing ACF fields to WP API without clicking publish button #49
Comments
I'm running into the same issue with a CSV importing script I am working on. Has anyone found any solutions? |
Hey @mantismamita, can you post a sample of your JSON? I'll run this myself and see if I can get a solution. I suspect it'll just be a case of linking up the correct hooks |
Hey @chrishutchinson I did get it working but I've since moved on to other projects and no longer have access to the code. @mitch-rickman if memory serves correctly I think I did an |
Thanks for the responses, @chrishutchinson & @mantismamita, I found a similar solve to as the one above. I was importing custom ACF fields, and the plugin I was using used update_post_meta(), which added the entries to the database, but it didn't link the value to the field. Using update_field() solved the issue. I found this article which helped me come to this conclusion: https://support.advancedcustomfields.com/forums/topic/cant-get-acf-fields-after-creating-a-new-page/ |
I’m having a problem displaying the ACF fields in the api from dynamically created posts using
wp_insert_post()
Here is the function I'm using to import the data as a custom post type:
I’m guessing I need to make the WP API writable to the ACF fields. They do display once I click the Publish button though but there are too many posts to do this.
The text was updated successfully, but these errors were encountered: