Title: Flexible Content toggle breaks sub-fields
Last modified: March 16, 2021

---

# Flexible Content toggle breaks sub-fields

 *  Resolved [jabbadu](https://wordpress.org/support/users/jabbadu/)
 * (@jabbadu)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/flexible-content-toggle-breaks-sub-fields/)
 * Hi,
 * the toggle-field function breaks some sub-fields.
    I have several flexible fields
   with a “headline” field.
 * If I now create content with several FC fields and hide one of them, the headlines
   of the fields defined above are displayed in the remaining parts.
    This phenomenon
   only occurs in the front end.
 * Did u see what i mean? 🙂
 * sorry images:
    [Backend](https://ibb.co/37xt7Fv) [Frontend](https://ibb.co/k5mwL3d)
    -  This topic was modified 5 years, 2 months ago by [jabbadu](https://wordpress.org/support/users/jabbadu/).
      Reason: add images

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Konrad Chmielewski](https://wordpress.org/support/users/hwk-fr/)
 * (@hwk-fr)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/flexible-content-toggle-breaks-sub-fields/#post-14199537)
 * Hello,
 * Thanks for the feedback! I’ve run some tests, and everything works fine here.
   I don’t know how you display your Flexible Content on the front-end, but I would
   recommend to use the `get_flexible()` or `the_flexible()` helpers if you’re using
   the Dynamic Render setting. See documentation: [https://www.acf-extended.com/features/fields/flexible-content/dynamic-render-example](https://www.acf-extended.com/features/fields/flexible-content/dynamic-render-example)
 * If you’re not using the Dynamic Render, then I recommend using the native `have_rows():
   the_row()` method with `get_sub_field()`, as described in the ACF documentation:
   [https://www.advancedcustomfields.com/resources/flexible-content/](https://www.advancedcustomfields.com/resources/flexible-content/)
 * Hope it helps!
 * Have a nice day.
 * Regards.
 *  Plugin Author [Konrad Chmielewski](https://wordpress.org/support/users/hwk-fr/)
 * (@hwk-fr)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/flexible-content-toggle-breaks-sub-fields/#post-14612391)
 * Hello [@jabbadu](https://wordpress.org/support/users/jabbadu/),
 * Just a heads up regarding this report. I had a similar report today, about the“
   Toggle” function which duplicate front-end layouts. I found the cause of the 
   problem and a fix will be added in the next patch.
 * In the meantime, you can apply the fix by yourself:
 * In the file: `/acf-extended/includes/fields/field-flexible-content-actions.php``
   line:415`
 * Add the following code (before the `return $value;`):
 *     ```
       $value = array_values($value);
       ```
   
 * Sorry for the inconvenience.
 * Have a nice day!
 * Regards.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Flexible Content toggle breaks sub-fields’ is closed to new replies.

 * ![](https://ps.w.org/acf-extended/assets/icon-256x256.png?rev=2071550)
 * [Advanced Custom Fields: Extended](https://wordpress.org/plugins/acf-extended/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/acf-extended/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/acf-extended/)
 * [Active Topics](https://wordpress.org/support/plugin/acf-extended/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/acf-extended/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/acf-extended/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Konrad Chmielewski](https://wordpress.org/support/users/hwk-fr/)
 * Last activity: [4 years, 11 months ago](https://wordpress.org/support/topic/flexible-content-toggle-breaks-sub-fields/#post-14612391)
 * Status: resolved