Home › Forums › ACF PRO › Retrieve most recent front-end edited fields? › Reply To: Retrieve most recent front-end edited fields?
Okay, thanks.
This makes sense.
However, where I am getting stuck is being able to loop through the repeater field attached to the posts to determine the most recent additions. Here is what I need to do:
1) Query the last 10 (let’s just use 10 for now) posts
2) Loop through the repeater field in each of those posts to grab the rows for each post
3) Sort all the rows according to date
4) Display the rows on the homepage in a “most recent” order
So would it be best to grab the rows for the repeater field for each of the posts and throw them in an array. And then sort the array according to the hidden timestamp field? Something like below?
http://stackoverflow.com/questions/6401714/php-order-array-by-date
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 use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.