Get single Wordpress gallery image with given title
- by Wickethewok
I am having users of a Wordpress blog upload a single image to different post's galleries with the name "banner". Basically, every post will have an image named "banner" uploaded to its gallery and this image needs to be displayed on the post's page outside of the article content. So, how can I get the URL to display an image in a post's single.php template?
Can I iterate through the images of a given post's gallery and find the one with the correct title somehow?
I've searched through the Wordpress codex docs and haven't found anything on a way to do this, just information on displaying galleries of photos. Note that I'm already using Wordpress's post thumbnail feature for something else.
Thanks!