Image link behavior
-
My posts for a particular blog consist of a photo with a caption. Sometimes a group of photos as a gallery. When the posts show on the front page or in an archive, the title links to the post but the photo links to the image file.I want the excerpt picture to link to the post as the title link does. Once on the post page, I want the picture to link to the image file (for lightbox display, etc.). I don’t think that the_excerpt is being called as the image still appears in the listings. I presume that the_content is being called instead.
I don’t want to use a plugin as I see this as theme specific functionality. Is there a function I can write, or something I can do in attachment.php to get this to be default behavior for the theme I am using?
- The topic ‘Image link behavior’ is closed to new replies.