Support » Plugin: Lightbox Plus Colorbox » caption from WP galleries

  • I am creating galleries from WP upload media facility and have enabled LightBox Plus to display them. I have ticked the box ‘Use WP captions as LBP captions’ however the captions do not show upon the lightbox displays in any Style I have tested.

    I have tried deactivating other plug-ins, but still no change.

    Has anyone else had this problem and any ways round it or maybe I haven’t clicked the right settings… thanks

Viewing 15 replies - 1 through 15 (of 15 total)
  • Yeah, This function works well on previous version. But after update, it doesn’t work. All the captions disappeared. Does anybody know how to fix it?

    I recovery the lightbox plus 2.5.5. It works again.

    how did you get 2.5.5, I only have 2.6 as that is now in the WordPress repository

    I recovered it from the backup file. You can search that version on Google.
    I found this via google search: You can give it a try.

    thanks, that link led to a page with a download link, but the link led to the current Lightbox Plus download, 2.5.5

    I may have a backupfile, ‘cos I did have captions showing, then I think I deleted the plug-in then decided to reinstall it, but I don’t know how to restore anything from a WordPress backup(?)

    do you have a zip file of version 2.5.5 by any chance? I’d really like to get captions showing on my gallery displays!!

    I was just going to open a thread about the same question. I havn’t used any previous version but I would like to be able to use the image caption from the gallery instead of the image title.

    (By the way, it’s easy to get 2.5.5 or any older version, just change the URL like this:

    thanks for tip about getting previous versions. I have reverted to 2.5.5, but still no captions – this is strange, when I first started using Lightbox Plus I was getting the WP captions displayed on the Lightbox image displays, but I can’t recall what version this was

    if the problem is not the version, what else could be preventing the plug-in displaying WP captions if that option is selected from the plug-in settings?

    I think I’ve identified one of two problems with the 2.6 code. There are two places where “Use WP Caption for LBP Caption” affects what happens. One of those works, the other does not (although there are errors in both). If you check “Auto-Lightbox Text Links” then it uses the first instance of code, which seems to work. If “Auto-Lightbox Text Links” is unchecked, it runs the second instance of code which does not work. That’s the work around

    As for the bug in the code…

    The first set of code works but only accidentally, as it turns out. Don’t know if the plugin author will see this, but on lines 117 and 120 in classes/filters.class.php there are single equal signs (i.e. assignment operator) where there should be double equal signs (equality operator). For instance:

    if ($e->next_sibling()->class = 'wp-caption-text') {

    should be

    if ($e->next_sibling()->class == 'wp-caption-text') {

    etc. Since both statements return true but since the second one assigns the proper value (at least for me), the code works but, as I said, only accidentally.

    This mistake is repeated on lines 202 and 203. That second set of lines doesn’t seem to work for me, even after fixing that, but I haven’t quite figured out why.

    this is great detective work, I am incredibly grateful as I am not knowledgeable enough to delve into a php file to see what may be amiss!!

    the line in my classes/filters.class.php file was like this (the whole section)

    * If use caption for title try to get the text from the caption - this could be wrong
                                        if ($lightboxPlusOptions['use_caption_title']) {
                                            if ($e->next_sibling()->class == 'wp-caption-text') {
                                                $e->title = $e->next_sibling()->innertext;
                                            elseif ($e->parent()->next_sibling()->class = 'gallery-caption') {
                                                $e->title = $e->parent()->next_sibling()->innertext;

    this shows the amended version (insert ==) and it works if Auto-LightBox Text Links is checked and Do Not Display Image Title: is unchecked

    BTW – in the above code extract should class=’gallery caption’ also have a double =? (although that does not affect my use of the plug-in I don’t think)

    Yes, the elseif line should also have ==

    Thanks for the help! Your trick worked perfectly.

    Unfortunately this doesn’t seem to work for me. Captions show up under the thumbnails, but not when I open the gallery. Substituting = with == on those lines gives me some sort of error. Is it connected with the style used? I tried a couple of them, but did not get any caption.

    Ok, got it, the solution does not work with ” Link captions to the image attachment page.” Now I don’t have links on the captions, but at least I have captions. Thanks!

    I added the 2 extra = under:

    * If use caption for title try to get the text from the caption - this could be wrong

    Checked Auto-Lightbox Text Links:

    Unchecked Do Not Display Image Title:

    And it did not work for me.

    I downloaded and installed the old version and did not work, then, I have updated the plugin again and the problem was solved, sorry for my english

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘caption from WP galleries’ is closed to new replies.