Support

Account

Home Forums Add-ons Flexible Content Field Shortcode + Flexible Content Reply To: Shortcode + Flexible Content

  • Hi @eli

    You could add the number as a value in the shortcode [shortcode number=2] and then in the shortcode function instead of doing a have_rows loop you can save the entire field to a variable and fetch the correct row based on the number.

    $flexible_field = get_field('layout_element_inserter');

    You’d have to of course look for the correct index of the specific layout type and not just grab the index right of the array.

    This entire workflow seems a little backwards to me tho.. Why not just have the flexible field on the pages and create all the content right there in the order you want it. If you like you can even completely ditch the regular editor and just use a flexible field layout with an editor as a substitute.

    You could achieve the same front end result or even better since you can also wrap editor content in its own html.