A Little Light Boxing

There are several methods for implementing the lightbox effect in a WordPress blog.  I was using the Lightbox 2 plugin since I started my blog a couple years back.  Or maybe I started with Lightbox and upgraded.  I really don’t remember; too much time.

I recently split my technology posts into this current blog and split them off from my personal blog.  I basically just copied everything over from the old blog to the new blog.  There were some oddities which needed ironing, but essentially everything worked fine.

I realized recently that my lightbox effect on this new blog was not functioning.  (My other blog includes my photography and so I use the effect a lot; this blog rarely includes images I create and thus it went easily unnoticed.)

In my effort to fix this issue I discovered a couple other plugins (Lightbox 3 and Lightbox Plus) which offer similar functionality.  Unfortunately I could get none of these three plugins to function.  I disabled all other plugins and tested three different themes (including the default theme), and none of this changed anything.

I suppose, in perfect 20/20 hindsight, I should have seen the obvious clue when I clicked on the image tring to get it to display.  When the image was clicked the browser was directed to a different page complete with all the blog dressing all around the image.  Usually if I click on an image (and by usually I mean on my original blog which was not having this problem) with the light boxing plugin disabled, I am directed to an image (no surrounding page).

Feeling closer to the solution?

Yeah, in the image properties dialog and on the Edit Image tab you will find a “Link to Image” button.  That is the URL you really want to use.  Click!

Image Properties — Edit Image
Image Properties — Edit Image

That’s it.  No coding.  No fancy work-arounds.  Just one click of a button.  (See this article for additional information.)

In the end I switched to Lightbox Plus for no particular reason, in case you were wondering.  (Yes, all three are working.)

Also, in my other blog (the blog where light boxing was always working) both of those buttons provide the same URL so there is clearly something else happening here.  I need to figure out how to make it work by default in a newly uploaded image because I shouldn’t have to make this change every time I upload an image.

I hope that saves you some of the hours it took me to discover the answer.


Leave a Reply

Your email address will not be published. Required fields are marked *