How to Use WP Lightbox 2 WordPress Plugin

I got so many questions about the usage of WP Lightbox 2 plugin. First that a lot to all you to make this plugin a best plugin for image overlay effect. Some Features of WP Lightbox 2:

  • Works on all modern browsers.
  • Group related images in post and navigate through them with ease.
  • Backwards Compatibility.
  • No configuration required.
  • 5 Inbuilt theme.
  • Lightbox display of Gallery.

Apart from the above features we added some more like – Image Map, Shrink large images to fit smaller screens, Enable lightbox in comments (disables the nofollow attribute!) and many more which makes this plugin unique and most popular.

How to Use:

  • You can use WordPress image galleries and have them grouped and auto-lightboxed:
  • You can also add a rel="lightbox" attribute to any link tag to activate the lightbox. For example:
  • <a href=”images/image-1.jpg” rel=”lightbox” title=”my caption”>image #1</a>
  • Optional: Use the title attribute if you want to show a caption.
  • If you have a set of related images that you would like to group, simply include a group name in the rel attribute. For example:
  • <a href=”images/image-1.jpg” rel=”lightbox[roadtrip]“>image #1</a> <a href=”images/image-2.jpg” rel=”lightbox[roadtrip]“>image #2</a> <a href=”images/image-3.jpg” rel=”lightbox[roadtrip]“>image #3</a>
  • No limits to the number of image sets per page or how many images are allowed in each set. Go nuts!
  • To disable lightboxing of an image link, just set any other rel-attribute: rel="nobox"

For developers:

  • Always have wp_footer(); just before the closing </body> tag of your theme, or you will break many plugins, which generally use this hook to reference JavaScript files
  • Apply lightbox to any content by running jqlb_apply_lightbox($your_content, "any ID"); It returns a string with all image links lightboxed, grouped by “any id”
  • Many JavaScript optimizers, combiners, minifiers, etc. conflict with wp_localize_script(), used to configure this plugin and many others.
  • If you experience problems with jQuery Lightbox, please disable all JavaScript-optimizing plugins. (Optimize Scripts, W3 Total Cache, WP Minify etc)
  • If you develop JavaScript optimizers for WordPress, please play nice with the default API…

Latest updates and download plugin here.

View live demo with sample code here

License

:
GNU General Public License, v2 (or newer):

Subscribe my updates, social media news, latest WordPress plugins, free e-books, and many more via Email.

Comments

  1. Hi,
    Great plugin! I’m trying to put an lightbox overlay on my login located on the top navigation menu. Is it possible, if so, how?

  2. Using WP 3.5 and 2.28 of your plugin. My gallery code is this: [gallery ids="3954,3957,3955,3956,3952,3953"]

    It’s not being lightboxed. Can you advise? Thanks so much for your time!

  3. Great plugin – but I don’t see the option in the plugin to allow “Image Map” links on the image that pops up in the lightbox? How do I enable or implement the “image map” for this plugin? I see you referenced it in the article as a new feature, but is it active yet? Thank you.

  4. only corrects the sentence on the demo link:
    Vie live demo with sample code here

  5. Problem with the new Gallery in WP 3.5.1, Pictures in a Gallery are not shown in the LightBox. Only in the attachment side the LightBox is working.
    I trying to find why this is so, and I have even something as a layperson, out.
    This plugin adds an addition in the link of the images: rel = lightbox [xx]. Whether it’s single image or gallery.

    Now, I have seen single images this is the case, only when a new gallery does not. The reference rel = “lightbox [xx]” is missing and only reappears on the attachment side.

    Any clue why?

  6. Good morning
    I’m testing your plugin on WP 3.5 but it’s not working.

    Inspecting the code I see that all my images report a rel=”lightbox[xyz]” attribute, and that’s OK, but I cannot see any lightbox javascript loaded into the page.

    Any known issue with WP3.5 and its new gallery system?

    Thank you

  7. great plugin, thanks! but you should improve some features especially changing color of box or disabling next&previous button etc. otherwise its ok.

  8. paradigmblue says:

    Is there a way to change the box colour from white to black?

  9. hi, i’m using the plugin and just updated it. i wanted to change the color of ligthbox effect to gray. the version before this update has dropdown menu wherein you can choose color but i don’t seem to find it when i updated it. nice plugin.

Speak Your Mind

*