Support » Plugin: WP jQuery Lightbox » Modifying WP jQuery Lightbox

  • I recently installed the lightbox plugin and had previously been using Lightbox 2.

    With Lightbox 2, there were settings to change the background colour, change the size of the box and so forth.

    Is it possible to make these types of changes with WP jQuery Lightbox? Is it a matter of modifying the CSS? Also, the lightbox adjusts size to suit the image rather than resizing the image inside a static box. Is it possible to have a static box and the image resize?


Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author ulfben


    Styling is done through CSS.

    A static size is possible but I don’t know if it’s worthwhile. The current behavior seems like a better strategy: it scales to fit on smaller screens, while allowing full-size view on high-res displays.

    Thanks. Yes, I know it scales for smaller screens. That’s not really the issue. A static size of, say, 800px x 800px would still fit on most smaller screens. The issue is more with optics. The box constantly resizing for portrait and landscape images is a bit annoying. I’d prefer a static box size with the images resizing to fit.

    Plugin Author ulfben


    Feel free.

    LOL! Thanks. That gets me back to my original question then. What would need to be modified in the CSS to achieve that?

    I’ve managed to get the background colour changed. But can’t yet figure out what to change to make the box static.

    Something else that’s interesting is that with some images, just the Caption is picked up and with some both the Caption and the Title. I’ve amended the CSS to remove Title and it still shows up in some. Odd.

    Plugin Author ulfben


    Give me a link to some examples of that behaviour.

    To get a static size you’d have to edit the javascript. The script is minified so you need to edit wp-jquery-lightbox.php first. Search for jquery.lightbox.min.js and replace it with jquery.lightbox.js.

    All scaling is managed in function doScale(). Play with it until you get what you need. If you succeed, please share the code. If it’s clean I might add it to the plugin proper.

    Any of the image galleries on my site will show it.

    As far as whether it will be clean, that’s asking a lot. 🙂 I’m not a programmer so any code I write is likely going to be far from clean.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Modifying WP jQuery Lightbox’ is closed to new replies.