ACF Repeater Fields
-
Simply amazing plugin! For the first time ever I have donated to a plugin author as this is the best one I have ever seen. Great work.
I have a problem I am trying to solve and I have spent a number of hours trying to solve it but I can only get the word “Array” to show up at best.
We have a repeater field setup in our post called “program_day”. Inside that are rows with repeaters inside them. Each row is called “exercise” with sub-fields “exercise_name” and “exercise_post_id”.
What I am trying to do is display each exercise in it’s own container with the exercise_name as a url to that specific post id.
I have printed the repeater field data on the page and have pasted it below but do not understand how to pull a specific “exercise” row and display the “exercise_name” as a clickable link to the “exercise_post_id”
I’ve tried countless combinations of the short codes but can only get “array” to show up. Any help would be greatly appreciated!
Thank you.
Array
(
[key] => field_54d2b9707e696
[label] => Program Days
[name] => program_day
[_name] => program_day
[type] => repeater
[order_no] => 0
[instructions] =>
[required] => 0
[id] => acf-field-program_day
[class] => repeater
[conditional_logic] => Array
(
[status] => 0
[rules] => Array
(
[0] => Array
(
[field] => null
[operator] => ==
))
[allorany] => all
)[sub_fields] => Array
(
[0] => Array
(
[key] => field_54d2b9937e697
[label] => Day’s Exercise
[name] => exercise
[_name] => exercise
[type] => repeater
[order_no] => 0
[instructions] =>
[required] => 0
[id] => acf-field-exercise
[class] => repeater
[conditional_logic] => Array
(
[status] => 0
[rules] => Array
(
[0] => Array
(
[field] => null
[operator] => ==
))
[allorany] => all
)[column_width] =>
[sub_fields] => Array
(
[0] => Array
(
[key] => field_54d2ba307e698
[label] => Name
[name] => exercise_name
[_name] => exercise_name
[type] => text
[order_no] => 0
[instructions] =>
[required] => 0
[id] => acf-field-exercise_name
[class] => text
[conditional_logic] => Array
(
[status] => 0
[rules] => Array
(
[0] => Array
(
[field] => null
[operator] => ==
))
[allorany] => all
)[column_width] =>
[default_value] =>
[placeholder] =>
[prepend] =>
[append] =>
[formatting] => none
[maxlength] => 18
)[1] => Array
(
[key] => field_54d2ba937e699
[label] => Exercise Post ID
[name] => exercise_post_id
[_name] => exercise_post_id
[type] => number
[order_no] => 1
[instructions] =>
[required] => 0
[id] => acf-field-exercise_post_id
[class] => number
[conditional_logic] => Array
(
[status] => 0
[rules] => Array
(
[0] => Array
(
[field] => null
[operator] => ==
))
[allorany] => all
)[column_width] =>
[default_value] =>
[placeholder] =>
[prepend] =>
[append] =>
[min] =>
[max] =>
[step] =>
))
[row_min] =>
[row_limit] =>
[layout] => row
[button_label] => Add Exercise
))
[row_min] =>
[row_limit] =>
[layout] => row
[button_label] => Add Day
[field_group] => 292
[value] => Array
(
[0] => Array
(
[exercise] => Array
(
[0] => Array
(
[exercise_name] => Tornado Abs Ep.25
[exercise_post_id] => 832
))
)
[1] => Array
(
[exercise] => Array
(
[0] => Array
(
[exercise_name] => Off
[exercise_post_id] => 0
))
)
[2] => Array
(
[exercise] => Array
(
[0] => Array
(
[exercise_name] => Tornado Abs Ep.26
[exercise_post_id] => 833
))
)
[3] => Array
(
[exercise] => Array
(
[0] => Array
(
[exercise_name] => Off
[exercise_post_id] => 0
))
)
[4] => Array
(
[exercise] => Array
(
[0] => Array
(
[exercise_name] => Tornado Abs Ep.27
[exercise_post_id] => 834
))
)
[5] => Array
(
[exercise] => Array
(
[0] => Array
(
[exercise_name] => Off
[exercise_post_id] => 0
))
)
[6] => Array
(
[exercise] => Array
(
[0] => Array
(
[exercise_name] => Off
[exercise_post_id] => 0
))
)
[7] => Array
(
[exercise] => Array
(
[0] => Array
(
[exercise_name] => Tornado Abs Ep.28
[exercise_post_id] => 835
))
)
[8] => Array
(
[exercise] => Array
(
[0] => Array
(
[exercise_name] => Off
[exercise_post_id] => 0
))
)
[9] => Array
(
[exercise] => Array
(
[0] => Array
(
[exercise_name] => Tornado Abs Ep.29
[exercise_post_id] => 836
))
)
[10] => Array
(
[exercise] => Array
(
[0] => Array
(
[exercise_name] => Off
[exercise_post_id] => 0
))
)
[11] => Array
(
[exercise] => Array
(
[0] => Array
(
[exercise_name] => Tornado Abs Ep.30
[exercise_post_id] => 837
))
)
[12] => Array
(
[exercise] => Array
(
[0] => Array
(
[exercise_name] => Off
[exercise_post_id] => 0
))
)
[13] => Array
(
[exercise] => Array
(
[0] => Array
(
[exercise_name] => Off
[exercise_post_id] => 0
))
)
[14] => Array
(
[exercise] => Array
(
[0] => Array
(
[exercise_name] => Tornado Abs Ep.31
[exercise_post_id] => 838
))
)
[15] => Array
(
[exercise] => Array
(
[0] => Array
(
[exercise_name] => Off
[exercise_post_id] => 0
))
)
[16] => Array
(
[exercise] => Array
(
[0] => Array
(
[exercise_name] => Tornado Abs Ep.32
[exercise_post_id] => 839
))
)
[17] => Array
(
[exercise] => Array
(
[0] => Array
(
[exercise_name] => Off
[exercise_post_id] => 0
))
)
[18] => Array
(
[exercise] => Array
(
[0] => Array
(
[exercise_name] => Tornado Abs Ep.33
[exercise_post_id] => 840
))
)
[19] => Array
(
[exercise] => Array
(
[0] => Array
(
[exercise_name] => Off
[exercise_post_id] => 0
))
)
[20] => Array
(
[exercise] => Array
(
[0] => Array
(
[exercise_name] => Off
[exercise_post_id] => 0
))
)
[21] => Array
(
[exercise] => Array
(
[0] => Array
(
[exercise_name] => Tornado Abs Ep.34
[exercise_post_id] => 841
))
)
[22] => Array
(
[exercise] => Array
(
[0] => Array
(
[exercise_name] => Off
[exercise_post_id] => 0
))
)
[23] => Array
(
[exercise] => Array
(
[0] => Array
(
[exercise_name] => Tornado Abs Ep.35
[exercise_post_id] => 842
))
)
[24] => Array
(
[exercise] => Array
(
[0] => Array
(
[exercise_name] => Off
[exercise_post_id] => 0
))
)
[25] => Array
(
[exercise] => Array
(
[0] => Array
(
[exercise_name] => Tornado Abs Ep.36
[exercise_post_id] => 843
))
)
[26] => Array
(
[exercise] => Array
(
[0] => Array
(
[exercise_name] => Off
[exercise_post_id] => 0
))
)
[27] => Array
(
[exercise] => Array
(
[0] => Array
(
[exercise_name] => Off
[exercise_post_id] => 0
))
)
)
)
The topic ‘ACF Repeater Fields’ is closed to new replies.