How to get multi-line titles in Shadowbox JS for WordPress
In my previous post How to-get multi line titles in michael jackson’s shadowbox.js, I’ve shown you how to change the behavior of the title to hold more than one line of text. That way you can use the title text as a “caption” or “description”, which wasn’t intended for originally.
There’s a similar version for WordPress: Shadowbox JS. You can find it on the plugin search admin panel, or from the WordPress Extend pages, and here’s how to hack that one too.
Files to hack
The files you need to change are in your Shadowbox plug-in folder, inside the “shadowbox” folder:
- shadowbox.js
- shadowbox.css
Locating the code
I posted an image of the compared code before and after the hack for you to easily locate the code to change, just a few characters in 6 lines. Unfortunately, this wordpress version of shadowbox has been white-space compressed. That means the lines you have to find are in a compact block of code. No lines, no spaces. So I recommend you to break up the lines you need only, at least you know what you are doing.
For the css code reformatting/beautifying I used the command “Apply source formatting” on DreamWeaver.
Javascript code
Following are the changes you have to make to the code in your-plugins-folder/shadowbox-js/shadowbox/shadowbox.js
CSS code
Following are the changes needed to the code in your-plugins-folder/shadowbox-js/shadowbox/shadowbox.css
Pages: 1 2

August 12, 2009
3:39 am
You are amazing!
I have been pulling my hair out for hours trying to figure out a solution for this.
September 13, 2009
10:01 am
YOU ARE AWESOME! Thanks for this great hack.
January 13, 2012
4:45 am
Not working anymore..