Title: [Plugin: Image Widget] Image Link using Lightbox
Last modified: August 19, 2016

---

# [Plugin: Image Widget] Image Link using Lightbox

 *  [one2gamble](https://wordpress.org/support/users/one2gamble/)
 * (@one2gamble)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/plugin-image-widget-image-link-using-lightbox/)
 * Is there a way to add lightbox/colorbox support to the image link?
 * [http://wordpress.org/extend/plugins/image-widget/](http://wordpress.org/extend/plugins/image-widget/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [cjk](https://wordpress.org/support/users/loomeinimene/)
 * (@loomeinimene)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/plugin-image-widget-image-link-using-lightbox/#post-1427025)
 * Yes!
    Open image-widget.php and go to line 193 and replace it with this: `echo'
   <a class="'.$this->widget_options['classname'].'-image-link" rel="lightbox" href
   ="'.$instance['link'].'" target="'.$instance['linktarget'].'">';` So basically
   just add rel=”lightbox”, and thats all. I’m using it with Lightbox Plus, but 
   it should work with all versions.
 *  [Jesper Videbæk](https://wordpress.org/support/users/vuudhouse/)
 * (@vuudhouse)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-image-widget-image-link-using-lightbox/#post-1427052)
 * I dont have line numbers in my editor.
    Will you tell the exact text I have to
   replace?
 *  [mrwickedd](https://wordpress.org/support/users/mrwickedd/)
 * (@mrwickedd)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-image-widget-image-link-using-lightbox/#post-1427054)
 * According to my txt editor. Line 193 is:
    * [@author](https://wordpress.org/support/users/author/)
   Shane & Peter, Inc. (Peter Chester)
 * is that what we are replacing?
 *  [F I S T O](https://wordpress.org/support/users/f-i-s-t-o/)
 * (@f-i-s-t-o)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-image-widget-image-link-using-lightbox/#post-1427055)
 * Sorry for just crashing the discussion – but i have the exact same problem.
 * [@loomeinimene](https://wordpress.org/support/users/loomeinimene/)
 * Great pointer
 * > So basically just add rel=”lightbox”
 *  – thanks i am also using the Lightbox Plus.
 * But i can´t seem to get it to work properly at what i am aiming. I have a front
   page with some thumbnails that trough a custom field in the post gets published
   on the frontpage. What i would like to do is to make a clique on this thumbnail,
   directly from the front page, to open the correlated post´s “image gallery” as
   a **lightbox plus** slideshow.
 * I followed your tip to change `rel="bookmark"` to `"lightbox"`, this seems to
   be the right way to do it, the problem is that the whole page with the header
   and the image gallery gets in to the lightbox, and not the actual images.
 * Grateful for any answer – merry x-mas from Sweden.
 * The complete code looks like this:
 *     ```
       <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php $values = get_post_custom_values("thumbnail"); echo $values[0]; ?>" alt="" /></a>
       <?php } ?>
       <?php the_excerpt(); ?>
       ```
   

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘[Plugin: Image Widget] Image Link using Lightbox’ is closed to new replies.

 * 4 replies
 * 5 participants
 * Last reply from: [F I S T O](https://wordpress.org/support/users/f-i-s-t-o/)
 * Last activity: [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-image-widget-image-link-using-lightbox/#post-1427055)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
