Home Forums General Issues get_fields cant see values, multi site, php export


get_fields cant see values, multi site, php export

  • I am having a problem with accessing the content using get_fields.

    I am on a multi site and I am exporting the custom fields schema as a PHP function for the other multi sites within the network to use.

    I can see that the update_field function is working and I can see this within the admin panel within WordPress (values being updated), however get_fields does not see all of the fields that are present.

    All the reading and updating is done outside of WordPress and this is where I think the problem is. If I save a post manually, the fields will then be available to read using get_fields, but it is only after this manual save has been actioned.

    I need a way to ensure these fields are available using get_fields without manually saving.

    Could you shed any light on this.

  • The problem is that when you build a plugin of other code to add fields that ACF will access that you’re not saving the reference value, see this page for more information:

    Your choices are to build your code to also store the reference value or to use the standard WP get_post_meta() function.

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

The topic ‘get_fields cant see values, multi site, php export’ is closed to new replies.