WordPress.org

Ready to get started?Download WordPress

Forums

NextGEN Gallery
How to remove the title on a thumbnail hover? (11 posts)

  1. bonzo01
    Member
    Posted 2 years ago #

    Can't seem to find an answer to this when using the search engine.

    When hovering an image in my gallery (thumbnail) the title of that image appears (image alt). I have a lot of images and the titles are usually low cap and "ugly", like "atthebeach_02". Obviously I don't want to manually edit every title, so how can I remove the title that hovers over the thumbnail pic?

    Thanks in advance :)

    http://wordpress.org/extend/plugins/nextgen-gallery/

  2. Toshi Yoshida
    Member
    Posted 2 years ago #

    You would need to edit the code. Which code depends on the shortcode your using.

    eg. if using a template=caption shortcode to display the gallery then you'd probably need to update gallery-caption.php and change title="<?php echo $image->description ?>" to title="" in the href statement.

    I haven't tested this so can't confirm it works ok! If you try this then backup the code before you change it and try it in a test site first if you have one.

  3. bonzo01
    Member
    Posted 2 years ago #

    Ty for the response, but it didn't work though.

    Im not using any templates or anything like that. Just the shortcode with the album id in it, shown as "image list". This shows all the images in thumbnails, and when hovering the cursor over a thumbnail the title pops up. This is what I want to remove.

    Im not very skilled when it comes to php and im not even sure if im editing the right php file, but I feel like I have tried them all now lol.

  4. Toshi Yoshida
    Member
    Posted 2 years ago #

    Do you have a link to a page that shows your problem? Also what shortcode are you using to display the thumbnal?

  5. Josh.biz
    Member
    Posted 2 years ago #

    I've encountered the same problem. A client doesn't want the title boxes (the little yellow text boxes) showing up when hovering over the thumbnails in any displayed NextGen gallery (displayed as an 'Image list').

    I found a solution. Edit the gallery.php file found in the View folder under the plug-in folder. You have to delete two entries which apply title displays (one for the image and another for the link). Remove title="<?php echo $image->description ?>" and title="<?php echo $image->alttext ?>" (lines 42 and 44). You can probably remove the display of title boxes in a similar way for other gallery display options by editing the appropriate file in the 'view' folder. But this worked for me. I use 'Image lists' more often than any other display option.

    Be warned, when the plug-in is next updated, this edit is likely to be wiped out (overwritten) so you'd need to make a note to remember to update it again manually (after each update).

    Let me know if it works for you too.

  6. Josh.biz
    Member
    Posted 2 years ago #

    Phew!

  7. pjar78
    Member
    Posted 2 years ago #

    Thank worked for me too. Thank you so much!

  8. Nattypat Crochet
    Member
    Posted 2 years ago #

    Actually I just noticed that my text/gallery.php is inactive so I think when using the Ngg Custom FIelds plugin it replaces it with it's nag-custom-fields.php, code below. Any thoughts on how to remove the hover box? Thanks!

    [ 830 lines of code moderated. That's way too much. For that many lines of code please use pastebin.com instead. ]

  9. jeremy2805
    Member
    Posted 2 years ago #

    @josh.biz - Thanks. That worked for me too.

  10. Josh.biz
    Member
    Posted 2 years ago #

    Sorry, Nattypat Crochet. I wouldn't know that answer to that.

  11. tillieb20
    Member
    Posted 1 year ago #

    I wonder if this is just me or not.
    I'm using jQuery lightbox which uses the description as a caption for the lightbox.

    When I removed the title="" from both the link and the img tag, it leaves the caption to be "Untitled"

    Does this make sense? Anyway around this?

    Is there a simple way to just hide the tooltip text?

    Any advice would be great.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic