Home › Forums › Front-end Issues › ACF Load Post – Flexible Content – Not showing up on front end until manual save › Reply To: ACF Load Post – Flexible Content – Not showing up on front end until manual save
If I am following you correctly, this is how it should look:
//Prepop Initial Notes
add_filter('acf/load_value', 'add_starting_flex', 1, 3);
function add_starting_flex($value, $post_id, $field) {
if ($field['key'] != 'field_5eb8736d02e62' || $value !== NULL) {
return $value;
}
// add default layouts
$value = array(
array(
'acf_fc_layout' => 'layout_note_text',
'field_5eb873ab02e63' => 'This is for the General Note only.'
),
array(
'acf_fc_layout' => 'layout_video_note',
'field_5eb8743702e68' => 'Starting Video',
)
);
return $value;
}
I tried that with no luck. Nothing was passed into the new post now. Did I get that incorrect?
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.