• Resolved enreas

    (@juandiegogutirrezgallardo)


    Hello.

    First of all, thanks for the plugin, it’s really helping me.

    I’m having a bit of a problem retrieving information about custom posts with custom fields. Although I see those fields and their values in the backend, when accessing said posts through REST, the JSON with the ACF values of some of this custom posts shows:

    “acf”:false

    I know this question is too open, but up to now I can’t provide any more concise details. How could I find the reason for this behaviour?

    Thanks in advance for your help and time.

    Best wishes,

    Juan Diego

    https://www.ads-software.com/plugins/acf-to-rest-api/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter enreas

    (@juandiegogutirrezgallardo)

    File lib/endpoints/class-acf-to-rest-api-controller.php, line 216, reads:

    $data['acf'] = get_fields( $this->id );

    That’s where acf gets its false value. I guess this lets the problem out of your plugin, it’s clearly related with ACF.

    Thread Starter enreas

    (@juandiegogutirrezgallardo)

    The solution, at least in my case, was as easy as updating the custom post through the backend. That is, opening that custom post instance in WordPress backend and hitting Update. After saving, get_fields() returns the custom post custom fields instead of false.

    Hope this helps…

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘"acf":false’ is closed to new replies.