Home Forums Front-end Issues Show as many multiple images as there are in the same page


Show as many multiple images as there are in the same page

  • Hello everyone

    I would like to show all of the images associated with a specific post in each single page. I understand that the_field[] can get the data associated with one field only and so can get_field_object[]. Based on this, how could you retrieve the image of each of multiple image type fields in a single page?

    Any advice would be appreciated.

    Thank you in advance.

  • Hi There,

    Thanks for reaching out to us.

    For such an implementation, I would recommend that you make use of the get_fields function.

    This function will return an array of all the field and value related to a specific post.

    You can then implement some code to filter and only return values for the image field type.

    Hope this helps.

  • Hello James

    Thanks for the suggestion. I’ve been looking for some code I could use to filter fields by field type across ACF Documentation with no luck. Does ACF natively support such functionality?

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

You must be logged in to reply to this topic.