Hello,
I’m building a theme for my website using the ACF Gallery. I would like the link on picture to open attachment page, but it open the image file only. How should I force the theme to open the picture as attachment page ?
Frederic
Hi @Frederic_C
The gallery field will return an array of images. Each image is itself an array containing lots of data such as ‘id’.
You can use the id to find the attachment link like so:
http://codex.wordpress.org/Function_Reference/get_attachment_link
Thanks
E
Great !!!
Thank you, the problem was in fact more a codex/wordpress problem than an ACF one. thank you for getting me in the right direction 😀