Wordpress prettyphoto lightbox not displaying title. Showing undefined instead

2.1k views Asked by At

http://atemporarysite.co.uk/?page_id=226#!prettyPhoto

Above is the link to my Wordpress gallery page. How do I get rid of the text 'undefined' which shows up under the image, after clicking on it?

I have tried for hours to work out where that is coming from. When I do the inspect element, it seems to point to prettyphoto.css but that is standard, we should not have to change that.

You guys are my only hope. Any help would be SO GREATLY appreciated thanks, Una

1

There are 1 answers

2
matthias_h On BEST ANSWER

There are several possibilities. If you only want to hide "undefined", you can add for class .pp_description visibility:hidden; or display:none !important;. Using !important is necessary because display:block is added to the description element by the gallery script.
If you want to have copy instead of undefined, you can try to add a title attribute to the link wrapping the image as it looks like jquery.prettyPhoto.js is setting the description copy from this title attribute which is not set. For reference: http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/:

To display a description, add the description into the TITLE attribute of your link.