Hi @ebeliejinfren,
Are any of your other ACF fields returning data?
Let me know.
Thank you,
Kevin.
Yes , All ACF fields plugin returning null
other data tag working good
Hi @ebeliejinfren,
I think I’ve found the problem. We have an issue with dealing with dashes in meta field names. I added a test field, rest-api-test, and received the same results as you (i.e. null). I then added a new field, rest_api_test_v2, and the value was accessible in the API. So I renamed rest-api-test to rest_api_test and everything worked.
Here is a screenshot showing that: https://imgur.com/a/UtEtK
Is it feasible for you to change your meta field names to use underscores instead of dashes?
Let me know.
Cheers,
Kevin.
thank you, yes by changing dash to underline problem solved.
an extra info : filed that name have dash auto change dash to underline and return null Like : “artist-en” in api show “artist_en”
new problem about acf filed that type are file, those fields not shown in module even
Hi @ebeliejinfren,
What type of save are you doing for files? File Object, File URL, or File ID?
I added a file field (File Object), renamed the REST API field, and am seeing results in the REST API (appears to be the file ID – "rest_api_test_file":"36",).
i use file url for file and i dont find it in module
I just set up a field with the file URL and it seems like it’s still saving the ID but the data is definitely accessible in the API.
Do you mean the field is not in the list of fields our plugin shows? We only show fields that have a value so if you need our field to show up try adding an image to your CPT and save it.
Cheers,
Kevin.