Support

Account

Home Forums Add-ons Flexible Content Field Get flexible layout field subfield outside loop Reply To: Get flexible layout field subfield outside loop

  • I’ve build some page layout stuff using ACF flex fields. Honestly, I don’t think there is an “easy” way when you need the information that’s stored in the layout fields to determine html, classes or css values before you can display anything. There are really 2 choices 1) loop through the fields twice, once do determine layout and once for the data 2) loop thought the fields once and store the data to use as your building the layout. Of the 2 I would do the second only because it means not repeating myself.