Home › Forums › Backend Issues (wp-admin) › ACF to Rest API Not Working › Reply To: ACF to Rest API Not Working
Hi John and Radizzt,
I am having the issue where when running the get request the custom fields I created are not showing up in the feed.
If I’m reading this correctly I need to add the custom fields in the below format to a template or to custom post type theme templates in my theme? Or can I add a it to functions.php?
Do I do this for every field?
$value = get_field('field-name');
if (!$value) {
$value = 'default value';
}
Advanced Custom Fields Pro (Latest V5)
I’ve added the rest API plugin and that didn’t work.
Thanks for your help.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.