Home › Forums › Add-ons › Repeater Field › A repeater for 'related posts' in flex content field › Reply To: A repeater for 'related posts' in flex content field
Hi @physalis
Can you please attach a screenshot to demonstrate what the data input looks like when editing the page/post?
Your task can be broken into smaller milestones:
1. Loop through the flexible content rows of data (see docs for examples)
2. Then, loop through the nested repeater field (see docs for examples)
3. For each row of the nested repeater field, load the selected post via get_sub_field function.
4. Use the returned data (either a post, or ID – depending on your settings) to then display the title, link and thumbnail for that post
Hope that helps.
Please be sure to post your code if you want me to help you with it.
Thanks
E
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’re reaching out to our multilingual users to ask for help in translating ACF 6.1. Help make sure the latest features are available in your language here: https://t.co/TkEc2Exd6U
— Advanced Custom Fields (@wp_acf) May 22, 2023
© 2023 Advanced Custom Fields.
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.