For ACF form plugin, I used field group function which contains 10 fields, and loop to display in post like below:
<?php $fields = get_field_objects($post_id);
if( $fields)
{
foreach( $fields as $field_name => $field )
{
if($field['type']=='text' || $field['type']=='textarea' ){
echo '<li>';
echo '<label>' . $field['label'] . '</label>';
echo '<span>' . $field['value'] . '</span>';
echo '<span>' . $field['order_no'] . '</span>';
echo '</li>';
}
}
}?>
Now I want to sort it by order_no, how can I do it?
You could try something like that before you print out:
Note: This is not meant to be a full correct code, I just want to give you an idea for the solution.