Home Forums Add-ons Repeater Field Post Object Repeater Image Select Instead of Title


Post Object Repeater Image Select Instead of Title

  • Is there a way to have post objects in a repeater field be selectable in the page/post editor as the featured image of that post rather than by title?

    I have a page that uses a repeater field to show the featured images of posts on the front-end like a gallery. I wanted to use post objects so that my client would only have to worry about one image representing a post in all places of the site. I wanted it to be in a repeater field so that they could reorder the post objects however they see fit.

    My problem is that in the back-end, the post objects are selectable by their titles in a drop-down box. This is totally fine for me, but I feel like my client would have an easier time if the post objects were selectable by their featured images instead.

    Basically I want gallery functionality within a post object repeater field. Am I dreaming too big or is there a better solution to this problem?

    Maybe I should just make it a gallery since it’s all the same images in the wordpress library anyway. Yep, I’ll switch to a gallery unless someone can steer me in the right direction using post objects and blah, blah, blah.

  • Hi @carolemagouirk,

    Thanks for the post.

    This functionality should be attainable with some little customization.

    You would need to hook into the acf/fields/post_object/result filter and modify the $args that are used to show the query results. You can then add some logic to call the post thumbnail alongside the title.

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

You must be logged in to reply to this topic.