Support

Account

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