I built an Exercise custom post type with a custom field group using Advanced Custom Fields. The structure uses repeater fields for Week, Day, and Exercise, which creates a series of nested arrays. It looks like this:
Week 1
-- Day 1
---- Exercise 1
---- Exercise 2
-- Day 2
---- Exercise 1
---- Exercise 2
-- Day 3
---- Exercise 1
---- Exercise 2
Week 2
-- Day 1
---- Exercise 1
---- Exercise 2
-- Day 2
---- Exercise 1
---- Exercise 2
-- Day 3
---- Exercise 1
---- Exercise 2
I am able to display all of the contents using nested while loops, but what I want to do is display a singe Day's exercises.
The final page will look like this:
Week 2
Day 3
List of exercises
I have tried different ways to limit output, including using a counter, but that only allows me to stop after X rows. I tried using array_slice, which worked fine on the outer most array level for Weeks, but did not work on the inner arrays.
Any idea how I can display a specific day?
var_dump( $your_array )
?