Lightbox Plus Colorbox
Fix for post title appearing in lightbox rather than image title (9 posts)

  1. hexagongirl
    Posted 2 years ago #

    Along with others, I discovered Lightbox Plus stopped displaying the image title - rather, it just displayed the post title for all images.

    This may be to do with a change in the way WordPress have formatted their gallery images, but fix is as follows.

    NOTE - THIS WILL BE OVERRIDDEN ON PLUGIN UPGRADE (Dan, if this fix is correct, could you fix in the next version please?):

    Open the following file: wp-content/plugins/lightbox-plus/classes/filters.class.php.

    In the section /** Do Not Display Title is select - yes/no **/, lines 191-193 should be as follows:

    if ($e->alt) {
       $e->parent()->title = $e->alt;

    i.e. change $e->title to $e->alt

    Hope that helps someone!


  2. SugarHillWorks
    Posted 2 years ago #

    Thank you @hexagongirl!

  3. yhager
    Posted 2 years ago #

    Perfect! Thanks!

  4. OldClicker
    Posted 2 years ago #

    Yes, works perfectly for me - many thanks!!

  5. bxwebber
    Posted 2 years ago #

    Changing that code in my case doesn't seem to work. Instead, it's completely the opposite:

    Old code:
    display of the image title (when 'Use WP caption' is checked),
    no display of the caption (no matter what the settings are).

    Proposed code fix:
    display of the PAGE TITLE (when 'Use WP caption' is checked),
    no display of anything when 'Use WP caption' and "Do not display title' is unchecked.

    But, unlike the earlier posters (?) Im running WP 3.9.1.
    And using Lightbox combined with Slim jetpack tiled gallery

    Maybe I'll start a new thread for this issue.

  6. geurvanmaillard
    Posted 2 years ago #

    Yep! Thank you. Works like a charm.

  7. TheRealCookie
    Posted 1 year ago #

    From my side also: THX! Works fine!
    (sad, that there ist still no fix in the plugin itself)

  8. Tech4Eleven
    Posted 1 year ago #

    thanks! no idea why this isn't implemented into the plugin by now.

  9. robbarent
    Posted 1 year ago #

    Has there been an update that prevents this fix from working? Not having any luck solving the post-title problem.


Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic