Home › Forums › Add-ons › Flexible Content Field › Rows/blocks difference and more? › Reply To: Rows/blocks difference and more?
The second page you linked to for the_flexible_field(), this function is deprecated and should not be used.
Layout: Table, Block or Row, refers to a repeater type field and not a flixible content field. Although you could be seeing something else if you’re using ACF4. I don’t have access to flex fields in ACF4 so I’m going by ACF5
Flex fields and repeaters share some similarities and they have differences.
The difference between the repeater layouts block an row are subtle to say the least. The block layout basically displays the sub fields in the same manner as other fields in a group, with the label above the input area while a row displays the labels in a column on the left with the inputs in a column on the right.
There are only a few function names that include the word row or rows and these all have to do with display of repeater fields and flex fields. Repeaters and flex fields are both what I consider to be “repeaters” the main difference between them is that the “rows” of a flex field can contain different sub fields while the “rows” of a repeater all contain the same sub fields.
For either type of repeater you’ll want to use a have_rows() loop https://www.advancedcustomfields.com/resources/have_rows/
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.