Weirdness Accessing ACF Field Values
-
I’m using NPE to create a list of posts based on a ACF date field:
order_post_by_acf_date='event_date asc' exclude_all_past_events='true'
In addition to the usual post title and link, I’m having NPE include two ACF fields in its output:
include_acf_fields='npe_nn_city_name, event_date'
My ACF field groups are registered via local JSON (load point folder located in a custom plugin).
NPE correctly matches my posts by ACF
event_date
without me doing anything more than this, however, NPE only displays the post title and link. In order to get the two ACF fields to display in NPE’s output, I have to log into each subsite and manually force ACF to sync the field groups. Once that’s done, voilà!, the extra fields appear in the output.Any idea why? In all other respects, these ACF fields are functional on my subsites without needing to manually sync. NPE is matching
event_date
, so why can’t it displayevent_date
without the sync?My sense is that when fields are registered via JSON or PHP, ACF doesn’t write the field group info to the database; only the field values.
On an unrelated note, I’m seeing a debug message in WP Admin about add_option_whitelist being deprecated. As best I can tell, NPE is the only thing I’m using that uses add_option_whitelist.
The page I need help with: [log in to see the link]
- The topic ‘Weirdness Accessing ACF Field Values’ is closed to new replies.