-
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
ACF not showing in Custom Post Type #37
Comments
Sadly I have the same issue. I made a project 2 weeks ago with exactly the same setup/plugins but the 'acf' part is not showing in json, whatever I try to debug. The CPT code in functions.php is identical, a real mystery. I use this part in the create CPT code in functions.php, same as your filter basically: ACF not showing anywhere, even not pages with some test ACF fields. Going to try a fresh install and build up again. Keep you updated. EDIT: fresh install didn't help. I ended up cloning the whole site including database and start from there. Used the exact same theme code of the install that didn't work. JSON outputs the "acf" field now! |
I just ran into a similar issue with one of our sites. We are using CPT-UI and the following versions of these plugins:
Locally we updated the plugins to the following versions:
They didn't appear to have any changes that I would consider is breaking, but when we updated locally, the 'acf' object quit showing up in our api calls. We pushed the changes to staging to make sure there wasn't an odd issue locally. The staging site broke as well, so we reverted our changes and re-pushed the plugins to the staging site. Everything was fixed on the staging site, but for some reason we still have this issue locally. I can't seem to figure out what would be causing this, since we now have identical code on our local and staging sites. We do use WP Migrate DB Pro to sync environments too, but again, we haven't found the culprit. I'm going to update plugins on staging until I can break them and see what I can find. |
Any updates on this? Experiencing the same issue :( |
I ended up migrating to WP-API 2 Beta 10. There were some significant changes we had to make on our end for our code to work. An FYI, we had to visit (not save or update, only visit) the Settings > Permalinks page once the WP-API 2 plugin was installed for the new routes to register. Not sure why we had to do this, but we hit our heads for about 2 hours trying to figure out why the new endpoints weren't present. This happened on both our staging and production sites. |
For me it was setting 'public' => true, on the registration of the cpt. |
In my case the ACF metabox shows up on the Code of my CTP:
|
👍 |
Still no fix about this? I have the same issue. |
I just found this solution. You just need to add this code to your functions.php and it would show all your post object ACF API.
|
Hello
Thanks for this great plugin.
I'm having trouble retrieving the acf fields in my cpt response.
Currently im making this call:
GET http://website.com/wp-json/wp/v2/locals/id
the "acf" field is not displaying.
This is what I added in my functions.php
Any suggestion?
The text was updated successfully, but these errors were encountered: