Home › Forums › Add-ons › Flexible Content Field › Is it possible to load all layouts on default? › Reply To: Is it possible to load all layouts on default?
Hi @Asitis
I would find the field_key and use that in the filter. You can find the field_key by editing your field group, clicking on the screen options tab, and toggle the option to show field keys.
This will then allow to you run the filter on and only on that field.
Next, remove the filter code and edit a post that contains the field.
Enter all ther default data you wish to appear.
Save the post.
Now add back in your filter code and simple dump out the value like so:
<?php
echo '<pre>';
print_r( $value );
echo '</pre>';
die;
?>
Now you can see how the $value needs to look.
You can now copy this data, and use it in your filter to override the $value.
Does that help?
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!
The new features in ACF 6.1 mean we’ve nearly doubled the number of translatable strings, and we need help translating them into your language. See how translations are progressing and how you can help at the link below. https://t.co/TkEc2Exd6U
— Advanced Custom Fields (@wp_acf) May 17, 2023
© 2023 Advanced Custom Fields.
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.