ACF: Get Post Object data within a Repeater

Grab that Post Object data right outta that Repeater!

I absolutely love Advanced Custom Fields. It’s part of the reason I love using WordPress so much. It makes things very easy for clients, and is a breeze to develop.

Every now and again I struggle to with grabbing and displaying desired data. A recently project required extracting data from a Post Object, within a Repeater. I struggled for at least an hour with tips from Stack Overflow as well as ACF forums without much luck.

Eventually I turned back to the original Post Object documentation for the answer. Basically, you’ll want to grab the Post Object data, then wrap the whole thing in your repeater code.

Here’s how I did it, using Flexslider. My repeater field is slides and the Post Object field is featured_projects:


Thanks. Just curious to see some live pages with advance layouts you\’ve made using acf :)


    Thanks for the link from your post Aksam. I\’ve been using ACF on nearly every project for a couple of years now. We tend not to get too complex – I never used the Flexible Content field for example. But it\’s times like this project posted here that minor complex items come up.


      Thanks. I didn\’t know about Flexible content field. Looks like its a page builder like plugin. good to know options like these exist. You never know when you will need them.

      I came across this repeater field issue when i was developing the custom post for this page design

      What do you think about this design? I\’ve not developed a post type this advance before, so I\’m wondering how it will work in a live environment.

      So far, I have already developed the custom post page except for the slider. It\’s working nicely on my local wamp server. The custom post type has about 10 custom fields including a textarea to save google my map code, another to save slider code, a post object field, few other normal fields and 3 repeater fields each with several sub fields.

      Looks like a fun layout to build. Custom post types and custom taxonomies!

i have post object called project_for_apartment. Then i have repeater called facility_fac. Inside repetear i have subfield called feature_value. I cant manage for days to extract those values on my custom template.


    Did you get this sorted out Steve? Go ahead and post your code and we\’ll see if we can sort it out.


Years later, but still saving the day. Thank you!


Hey thanks for the tip! Unfortunately I’m only getting one of my repeater values printed. Narrowed it down to the while loop failing after the first post prints. Any ideas why that may be?

If I kill the and just enter random characters they will print the number of times that the while loop executes. However, with the post object assignment in there it will only loop once.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Check out our Complete Website Package

Chat with us about your project or click below to find out more!

Learn More   Chat with us

Hi. We are Spigot. Telemarketers pronounce it Spy-got.

We are a Park City, Utah based web design shop that excels at building custom websites powered by WordPress and WooCommerce. We love content - content strategy, content curation, content soup...????Have a look around the site. As you browse you'll find useful navigation links in the sidebar on the left. We hope you find them useful anyway... Please let us know what you think, shoot us a message here.