WordPress.org

Ready to get started?Download WordPress

Forums

Adding an image and a link to captions. (2 posts)

  1. spintree
    Member
    Posted 6 years ago #

    Hello all.

    I've been poking about the past few days and haven't yet seen a solution to my problem. I am attempting to link a small image below a thumbnail to the larger version of the thumbnail. In other words, I would like users to be able to click both the thumbnail and a magnifying glass to reach a full size image. Please see this image.

    In media.php I found the lines (379 ish) that control the HTML for the captions. I altered it:

    return '<div ' . $id . 'class="wp-caption ' . $align . '" style="width: ' . (10 + (int) $width) . 'px">'. $content . '<div id="captionIcon">
    			<a href"" rel="lightbox[]"><img src="[full path to image]/images/magnify.gif"></a>
    			</div>
    		<p class="wp-caption-text">' . $caption . '</p></div>';

    The only bit left is the link around magnify.gif to the full version of the image. Any idea what that url would look like? I've trying pulling bits of code from elsewhere in this file, as well as from post-template.php and post.php but everything is throwing up errors.

    Thanks in advance for any advice!

  2. mhains
    Member
    Posted 5 years ago #

    Hey, spintree,

    did you ever get a solution to this? I'd like to simply overlay a magnify icon over the thumbnail via CSS but I don't know how to do it.

    Michael

Topic Closed

This topic has been closed to new replies.

About this Topic