Support

Account

Home Forums ACF PRO Create a loop of selected posts form a custom post type

Solved

Create a loop of selected posts form a custom post type

  • Hi there,

    Do you know if it’s possible to create a field (repeater or similar) to loop a list of selected posts form a custom post type?

    I mean:
    I have the CPT named X (with posts 1, 2, 3, 4, 5, 6 etc).
    In a new page I want to list only some specific posts form CPT X (selecting them form a list of all the posts of that CPT). In another new page I want to list only posts 3, 5 and 6 …and so on.

    thank you

  • You could use a relationship field and set it up with the CPT. The documentation page on the field gives a code sample to loop through a list of posts selected with a relationship field.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.