This is the normal behavior.
ACF field value will not be added directly in your post until you save it. I’ve been facing this “issue” lately.
this is because you have created your field after your posts. So, your posts don’t have the associated value.
load_field doesn’t add values on existing post, it only add your value on the post form edition.
What I suggest, is that you can do a one-shot function that update all your posts in a second.
foreach(get_posts($args) as $post) {
$data[] = ... // your event data
update_field('your_field_group', $data, $post->ID);
}
be careful here, you might want to use add_row function instead of the update_field (depending on your needed)
https://www.advancedcustomfields.com/resources/add_row/
Related Posts:
- Change content before writing to database
- Let Users Filter Posts by Custom Fields
- How to show ACF fields in Gridbuilder custom block
- How to add content with a filter when there’s no content in the editor
- Filter and display a specific custom field value [closed]
- How to filter post using custom feild value in shortest and longest duration?
- Query Posts Via WordPress URL
- Advanced Custom Fields: how do I check to see if a value is set in an field? [closed]
- Add filter menu to admin list of posts (of custom type) to filter posts by custom field values
- Where are custom field values stored in the database
- Is there any action filter/hook for validating a custom field before publishing the post?
- Filter WP_Query for posts having a certain meta-value
- Advanced Custom Fields – Get custom fields from parent page
- Add custom field to the archive page?
- Apply the_content filter to a custom field with multiple values
- Matching Serialized Arrays with meta_query
- Pass all custom fields through the same filter on post load?
- How to position a custom field before the editor
- Display post_object content using Advanced Custom Fields plugin
- Remove old custom field after import
- Unable to get Preview of Uploaded image within a Custom Meta box
- Filter results with custom field values and dropdown
- Retrieve custom fields on Categories, using WP-API
- Archive sorting functions by custom fields (front-end)
- Order by custom field date?
- WordPress Search Custom Meta Field Only
- Order Custom post type loop by custom field (datepicker)
- How do I assign this filter to a variable? (Appending php & markup to the_content)
- Using custom fields in a filter hook
- Using Custom Function With Advanced Custom Fields
- automatically set “Featured Image” the same as the og:i that is set in a custom field
- Problem with adding exta field in metabox in custom post type
- Add an advert every nth Paragraph
- Copying Custom Meta Values from existing post to a duplicate post
- Calculate the sum of certain the_sub_fields
- How to filter a dd/mm/yyyy date from a custom field in a query
- Displaying Custom Fields on Post with Genesis Child Theme
- Unable to show ACF’s Image Custom Field properly in Genesis Framework [closed]
- Login & Register & Custom details WITHOUT plugin
- Send Multiple Custom Field Values Through the URL
- ACF won’t load from a custom JSON location
- Force hide custom field metaboxes
- Saving custom profile fields
- Show ACF fields only on certain page in the backend
- How can I pass a variable set by ACF to header.php?
- WP Custom Fields Metabox Disappears – ACF plugin issue [closed]
- How to validate custom field on lost password form before the user id field?
- Transfer self made functions.php custom fields to Advanced Custom Fields [closed]
- ACF: How to get the full field name (meta_key) by a field key?
- Dynamically fill a post custom field with post publish date
- How can I store a file in the database in the same way WordPress and ACF do?
- Will loading too many ACF Fields cause slow down?
- WP_User_Query pulling ACF to loop
- filtering custom post types via meta data drop down
- global function to apply filter to custom field
- How to order posts by one custom field and filter them by another one?
- Calling the “wp-link-wrap” pop-up modal
- Print custom field in Query Loop block
- How to add Advenced Custom Fields In Single Post
- How to schedule a custom field value update?
- Order RSS content by an advanced custom field value
- Add new image block, set default class name and update it using Javascript
- Get an advanced custom field after post publish
- How to create a dropdown select of all items in an ACF field group
- Advanced Custom Fields dynamic update_field
- WooCommerce – Adding Custom Fields To Invoice
- Filter multiple custom fields Values with Check boxes
- How to get categories with posts by custom field value?
- Sort custom post type by multiple custom fields
- Redirect to another page using contact form 7? [closed]
- How to Wrote Simple Calculations by Using Custom Fields in Loop?
- Vimeo thumbnails
- Advanced Custom Fields WYSIWYG More tag
- Walker class for sub-menu with ACF fields
- How to list Category list in ACF Pro’s Select Field to choose from [closed]
- Get all the posts where meta field with multiple choice has several values checked
- Best filter to use for modifying custom fields on a post?
- Custom fields issue [closed]
- Querying posts by latitude and longitude to build a Google Maps with several markers
- How to display childrens custom fields?
- ACF: How to get users with a ACF flexible content subfield with a specific value AND layout?
- Get users based on month ACF datepicker field
- Access ACF fields within custom preview function?
- How to copy data from a custom field to the post_content?
- WordPress creates new lines in postmeta table on post update
- Sort posts by clicks on download button
- ul list with only as many li’s as filled custom fields
- Retrive Image URL of Custom Fields in Theme
- Display custom field from the front page on another page
- How to Pass values to Custom Field through PHP in WordPress Posts?
- Filter posts by custom field (Advanced Custom Fields)
- Advanced Custom fields not available yet during publish_page action
- How can I output the custom fields wrapping with HTML
- Displaying an ACF list of users
- The conditional logic only works to show or hide?
- ACF Plugin How to make the customer add more fields in the post?
- Custom field Search with Relavanssi
- Custom Theme Fields in Settings Menu – apply filters to one of those fields?
- Footnotes in custom fields
- How to change permalink on headlines in rss feeds?