Support

Account

Home Forums Add-ons Flexible Content Field Add Flexible Content and fields to post Reply To: Add Flexible Content and fields to post

  • Documentation should be here:

    https://www.advancedcustomfields.com/resources/add_sub_row/

    So, you need to know your flex-content fields’ field name too.

    For example, if your field_name is ‘page_blocks’, you’d do something like:

    
    foreach ($config as $index => $field) {
        foreach ($field['subfields'] as $key => $value) {
            add_sub_row(array('page_blocks', $index, $key), $value);
        }
    }
    

    p.s i haven’t tested yet.

    Cheers