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’m not 100% sure, but potentialy you could use the acf/load_value filter to create all the dummy data.
That way, ACF will then render out all the layouts.
This is how I would do it:
1. Read the docs for: http://www.advancedcustomfields.com/resources/filters/acfload_value/
2. Add the filter to you flexible content field and just debug the $value parameter to see how the data is displayed (you may need to edit a post which already contains data)
3. Next step is to modify the $value by adding in a new row of data (make not of the layout attribute for each row which defines the layout)
4. Once you can add an extra blank row, update the function to add 1 of each row type, but only append to the $value if $value is empty (new post)
Hope that helps
Thanks
E
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.