# How to open featured image with Lightbox Plus ?

**URL:** <https://colorlibsupport.com/t/how-to-open-featured-image-with-lightbox-plus/5638>\
**Category:** Pinbin\
**Created:** [May 8, 2014, 9:38pm UTC](https://colorlibsupport.com/t/how-to-open-featured-image-with-lightbox-plus/5638 "2014-05-08T21:38:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![der\_marv](https://colorlibsupport.com/letter_avatar_proxy/v4/letter/d/5f8ce5/32.png) [@der\_marv](https://colorlibsupport.com/u/der_marv)\
**Post date:** [May 8, 2014, 9:38pm UTC](https://colorlibsupport.com/t/how-to-open-featured-image-with-lightbox-plus/5638/1 "2014-05-08T21:38:36Z")

</div>

Hello,

I love Pinbin but I have a small problem.  
I would like to use Pinbin as my gallery/portfolio.  
So I would like to click on a featured image and the image should open in Lightbox Plus.

At the moment it only works with images from the post.

Yes I know, I could use post images but I like the design of the post with a featured image.

Thank you very much.  
Darius

---

<div class="post-metadata">

**Author:** ![aigars-silkalns](https://colorlibsupport.com/user_avatar/colorlibsupport.com/aigars-silkalns/32/13469_2.png) [@aigars-silkalns](https://colorlibsupport.com/u/aigars-silkalns)\
**Post date:** [May 9, 2014, 8:08am UTC](https://colorlibsupport.com/t/how-to-open-featured-image-with-lightbox-plus/5638/2 "2014-05-09T08:08:14Z")

</div>

The thing why lightbox is not working is because image points to Posts itself not the larger image you have uploaded as featured image.

You can overwrite this by replacing

`<a href="<?php the_permalink() ?>"><?php the_post_thumbnail( 'summary-image' ); ?></a>`

inside index.php file with this code. Make sure you leave `pinbin-image` div in place to wrap this code.

```auto
 <?php
 if ( has_post_thumbnail()) {
   $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large');
   echo '<a href="' . $large_image_url[0] . '" title="' . the_title_attribute('echo=0') . '" >';
   the_post_thumbnail('summary-image');
   echo '</a>';
 }
 ?>

```

If lightbox plugin still doesn’t work you might want to add extra class to featured images or target specific class form lightbox side because it might be limited to only post content. But it is matter of copy/paste, so I will leave it to you.
