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.
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!
We've just released ACF 5.12.3 with a security fix to prevent arbitrary file uploads to forms with ACF fields.— Advanced Custom Fields (@wp_acf) July 14, 2022
Now that we've released this update, we recommend updating your sites as soon as possible.
© 2022 Advanced Custom Fields.