Support » Plugin: Lightbox Plus Colorbox » Image titles problem

  • Hallo.
    I use lightbox plus for WP native gallery.
    I’ve already set “gallery link to file” in gallery preferences.

    The plugin works well for size, color, navigation, etc. but in the images appears only post title (?), number of image and total images.

    I’d like to make appear also the title of image.

    Can somebody help me to do this?
    Thank you very much,
    Alessandro

    https://wordpress.org/plugins/lightbox-plus/

Viewing 15 replies - 1 through 15 (of 20 total)
  • Plugin Author Dan Zappone

    (@dzappone)

    I’ll see what I can do before the next release.

    Hi!
    Thank you so much.
    Best regards,
    Alessandro

    Hello,
    i ran into the same yesterday, tried to fix it but simply found no way. 🙁
    it would be really appreciated if that will be fixed before the next release.
    thanks in advance
    Boris

    Plugin Author Dan Zappone

    (@dzappone)

    This is with the Jetpack Tiled Gallery not the regular gallery correct?

    Take a look here:

    http://www.23systems.net/wordpress-plugins/lightbox-plus-for-wordpress/demos/#lbp-gallery

    As you can see the standard galleries show titles (the first two) but the tiled gallery shows the post name (the last one.)

    Pleas let me know if that is the issue.

    Sorry,
    but the problem is with native WP gallery.

    Here are some examples of my site:

    http://www.viadellaseta.net/namibia-galleria-fotografica/

    or

    http://www.viadellaseta.net/bukhara-samarcanda-galleria-fotografica/

    I haven’t Jetpack suite installed.
    Thank you,
    Alessandro

    Update:
    now my wordpress rel. is 4.0

    Plugin Author Dan Zappone

    (@dzappone)

    Ok, so it gets the title from the anchor element and not the image element. all your anchor elements have the post name for the title which is why the title is showing up that way.

    You might check Primary Lightbox Settings –> Other –> Use WP Caption for LBP Caption and see if that is checked.

    Also check to make sire your image attachment has Title, Caption, and Alt Text filled out though it should just require title.

    Well.
    The “Use WP Caption for LBP” option was already flagged.

    All images have an own title that describes the image (for example “Gnu in Namibia”) and both caption and alt text are the same of the title.

    I define every title just after uploaded each images, by the following process:

    media -> modify images -> then I fill every field with title, description and so on. (Sorry but my version is localized in italian)

    I am having the same issue. Is there a solution to this problem?

    My site is running on WP 4.0 on a child theme of twenty-fourteen – with only a handful of css changes in child theme. My settings are checked here – “Use WP Caption for LBP”, and in my gallery, I had selected “Link to Media File”. My images also have text in the Title, Caption, Alt and Description areas. – And none of this is showing up, only the name of the post.

    Hi Im having this problem on a site too:

    Walkabout Characters

    It’s just a native WP gallery. The title is entered into the Title and Alt tag but for some reason the lightbox title is the page title, not the image title.

    Plugin Author Dan Zappone

    (@dzappone)

    So, the link should have the image title and for some reason it’s got the post title instead. I’ll check the gallery replacement shortcode and see if there’s an issue there otherwise the problem is somewhere else in media post data itself.

    Hi Dan,

    It might be useful for you to know that with the plugin deactivated that no title attribute is generated at all for the wordpress gallery image links.

    For the rest of you, adding the following to your themes functions.php will solve the problem (although I’m sure this should be built into the plugin, not your theme!)

    //add title to image links
    function add_title_attachment_link($link, $id = null) {
    	$id = intval( $id );
    	$_post = get_post( $id );
    	$post_title = esc_attr( $_post->post_title );
    	return str_replace('<a href', '<a title="'. $post_title .'" href', $link);
    }
    add_filter('wp_get_attachment_link', 'add_title_attachment_link', 10, 2);

    We thought we would try your suggestion with the code added in the functions.php and we kept getting a fatal error no matter where in the file we added the source code.

    We are using a child theme of Twenty-Fourteen, however the only changes we have made in our Child Theme are CSS – so we had to first create a functions.php file. We copied the Twenty-Fourteen function.php, loaded it to our child theme directory then added your source code, but it did not work.

    We really would like our Titles to show over the post name. So until Dan revises the plugin, can you give us a bit more direction as to how you added that code to work for you?

    Thanks!

    Hi Yoke605,

    What is the exact error you are seeing? Please paste it in and maybe I can help.

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Image titles problem’ is closed to new replies.