Display image title/alt description from custom image url
-
I made a gallery template to be used as an album template by add media, create gallery and then edited the html to point to my gallery urls and thumbs.
I have hundreds of galleries in monthly format so all I need to edit is the year, paste it into a new post and it displays my album for that year.
It works fine but I can’t get it to display the title/alt and description from the thumb where the caption is displayed.
I’ve spent days trying without success, most things I’ve tried seem to complicated as I’ve done this on another site using nextgen by simply adding one line of php echo, but the same code doesn’t work in a blog post.<div id='gallery-1' class='gallery galleryid-218 gallery-columns-6 gallery-size-thumbnail'><dl class='gallery-item'> <dt class='gallery-icon'> <a href='http://www.site.com/*year*/1/' title='TITLE HERE'><img width="150" height="225" src="http://www.site.com/gallery/*YEAR*/1/thumb/01.jpg" class="attachment-thumbnail" alt="ALT HERE" /></a> </dt> <dd class='wp-caption-text gallery-caption'> DESCRIPTION HERE </dd></dl><dl class='gallery-item'> <dt class='gallery-icon'> <a href='http://www.site.com/*year*/2/' title='TITLE HERE'><img width="150" height="225" src="http://www.site.com/gallery/*YEAR*/2/thumb/01.jpg" class="attachment-thumbnail" alt="ALT HERE" /></a> </dt> <dd class='wp-caption-text gallery-caption'> DESCRIPTION HERE </dd></dl>
- The topic ‘Display image title/alt description from custom image url’ is closed to new replies.