Best way to incorporate a repeater block on any page, e.g. homepage

Hey there.

I want to display the latest posts of an Instagram account on the homepage. The data is coming from the basic display api and is currently stored as id, caption and image url inside a repeater field within a custom post type. So, I went and created a new post and inserted some test data from the last few instagram entries and also edited the post to hold a repeater block with the right template structure. Afterwards, I switched to the home page and used a query block to first get ahold of the custom post type and then I put another repeater block within the query block. This works, but I am not sure, if it is the best approach. How would you tackle a scenario like this?

To put in other words, how would you create a section with a repeater such as shown in this video:

I am still getting acquainted with ACF and all of its capabilities. Hope you can help me out here.

Edit: I saw that there is quite a similar thread already :relieved:. @Araminta Is there a chance for an updated tutorial on repeater blocks?

Hi @mat5ch,

Sounds like you’ve got the hang of things!

I would tackle it exactly the way you described: inserting a Repeater bock within a Query block, which is the retrieving the specified CPT.

Here is a short demonstration:

Please don’t hesitate to let me know if you have any other questions.

1 Like