WP Plugin Review - WP Lightbox 2

Plugins don't get much simpler than this to use. Simply install and activate the script and it automatically converts all of the thumbnail images you have linked to larger images so that the larger images display in a lightbox instead of as a separate page.

Well it isn't quite that simple but almost. You do need to make sure that the HTML connecting the full sized image to the thumbnail image is written correctly to start with. Here's how the code basicalls should look (assuming that both images have been inserted into the page via the media option that adds the appropriate path to the front of each one.

<a href="fullsizeimage.jpg" rel="lightbox"><img src="thumbnailimage.jpg"></a>

Without the lightbox plugin, images coded like that will display the thumbnail image in the page and if that thumbnail is clicked on then the full sized image will open as a separate page. With the plugin the full sized image doesn't open as a separate page, instead it opens over the current page with a semi transparent background so you have to clost that image before you can open - in short lightbox functionality.

The only thing that you add to the basic image link functionality to get the lightbox to work is to add the rel="lightbox" attribute to the link. Using this allows you to identify the specific links that the lightbox script is to interact with so that it doesn't break any of the other links in your pages by tring to treat those as lighboxes as well.

go to top

FaceBook Follow
Twitter Follow