Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter OC2PS

    (@sooskriszta)

    @lesbessant Any ideas on how to address this?

    Plugin Author Les Bessant

    (@lesbessant)

    Thanks for the reminder – I’ve just had a quick look, and done a bit of fiddling on my test site.

    Adding the code suggested by photoMaldives in this support thread restored the tooltip to the thumbnails in a gallery, and added titles to lightbox images.

    I’ll do some more tests and update the plugin.

    In the meantime, adding this code:

    function my_get_attachment_link_filter( $content,$id ) {
            $title = get_the_title($id);
            $new_content = str_replace('<a ', '<a title="' . esc_attr($title) . '" ', $content);
            return $new_content;
    }
    add_filter('wp_get_attachment_link', 'my_get_attachment_link_filter', 10, 4);

    before the closing %> in the existing version should sort it out.

    Thread Starter OC2PS

    (@sooskriszta)

    Just reporting back to say the snippet worked for me. Thanks.

    Plugin Author Les Bessant

    (@lesbessant)

    Good to know – thanks.

    I’ve updated the plugin, and it’s available now.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Not working for galleries’ is closed to new replies.