WordPress.org

Forums

Easy FancyBox
[resolved] Title Will Not Display (4 posts)

  1. tjbuege
    Member
    Posted 1 year ago #

    I cannot figure out how to get the title to display in the lightbox. I am running WordPress 3.6.1, Easy FancyBox 1.5.5 and NextGen Gallery 1.9.13. I have Show Title checked, AutoGallery disabled, and my images have titles assigned to them in NextGen.

    If this has already been answered, I apologize for not finding that. Searching the wordpress forums is impossible.

    Thank you,
    Tim

    http://wordpress.org/plugins/easy-fancybox/

  2. RavanH
    Member
    Plugin Author

    Posted 1 year ago #

  3. tjbuege
    Member
    Posted 1 year ago #

    Hi, Thanks for the response. I can't share my site url with you because it is running on my laptop at the moment. :)

    I've been continuing to look at this, and I think I've figured it out. It appears this is not a problem with Easy FancyBox. NextGen Gallery is hard-coded to set the anchor tag title attribute to the description field for each photo. It does not use the title/alttext fields for each photo.

    What I ended up doing is making a copy of wp-content\plugins\nextgen-gallery\view\gallery.php file, naming it gallery-title.php and copying it into wp-content\themes\twentyten\nggallery folder. I updated the php code to set title to the actual title/alttext field of the image, and now FancyBox correctly displays the title with each picture in the light box.

    In my shortcode on the post/page where I display the gallery I include template=title which tells NextGen Gallery to use the new modified gallery-title.php file, like this: [nggallery id=35 template=title].

    I think this is the correct way to do this, though I wasn't able to find this in the documentation. If there is another/better way to do this, maybe someone can share some tips.

    Tim

  4. RavanH
    Member
    Plugin Author

    Posted 1 year ago #

    It surprises me that NextGEN does not allow to set (or even uses) an img tag alt attribute. Maybe you can submit this as a feature request?

    Anyway, thanks for sharing your clever work-around. I was not even aware that NextGEN allows you to use custom templates :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic