Support

Account

Home Forums ACF PRO Reference field with ACF field key not created when creating posts via REST API

Helping

Reference field with ACF field key not created when creating posts via REST API

  • I’m publishing new posts on my WP site via WordPress’ REST API. All fields get properly populated, including ACF custom fields, but the reference field is not created in wp_postmeta, which means those fields do not show up in the front-end.

    Here is the DB entry after auto-publish a post via API:

    img

    It’s not until I manually go into each post and hit the ‘Update’ button that the reference field is created in the DB table.

    img

    Any idea why A) the reference field is not created when publishing a post via REST API and B) how to fix this issue?

    I would really appreciate some help/direction!

  • I “solved” it for now by directly querying the custom fields via WP’s built-in get_post_custom() function. Not 100% ideal, but it does work.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Reference field with ACF field key not created when creating posts via REST API’ is closed to new replies.