Showing attached image inside a custom post


I think the solution for my problem is simple, but i just can’t get over it.

I’m using ACF, and i have only one attached image for a custom post type. The image is uploaded to the media library in 3 sizes, i can retrive the attachment id, and from that, the image url too.

I would like to show an image in the post, below the input fields. Thats all. The input fields contains the customer’s data, and i would like to set the attached image to some kind of field to show this to the site admins. Maybe a thumbnail, and show the picture onclick event.

I tried to create a ‘file’ field, what i will programatically update with the picture, but it wont worked.

What do you think, what would be the simplest / most elegant method to achvie this?

Thank you.

LeafNotTwig_v 4 months 0 Answers 15 views 0

Leave an answer