WordPress.org

Ready to get started?Download WordPress

Forums

Easy FancyBox
Using Captions (8 posts)

  1. forrestbro
    Member
    Posted 2 years ago #

    I been trying several different FancyBox/Lightbox plugins for displaying larger versions of images on my blog and so far Easy FancyBox is my favorite. My one problem is that I would like to show the image caption in the FancyBox window instead of the image title or alt text. And if there's no caption then do not show any text.

    Any help would be great appreciated.

    Forrest
    http://www.forrestbrown.com/blog/

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

  2. RavanH
    Member
    Plugin Author

    Posted 2 years ago #

    That' s not easily done, I'm afraid.

    It would require either hacking the fancybox script or adding a complete new feature to my plugin code...

    Easier would be to make the caption and the alt attribute the same, leaving you the freedom of a different title attribute.

  3. landwire
    Member
    Posted 2 years ago #

    Keep me posted!

  4. nickd32
    Member
    Posted 1 year ago #

    @RavanH - We just switched over to Easy Fancybox from another JS shadowbox plugin, and I'm just now seeing that it doesn't support WP captions. :(

    I know there are lots of users who would really love this feature; I'm even willing to help you develop it.

    It's actually not too hard to do with a bit of jQuery (and knowing how WP displays captions)... Try this:

    http://pastebin.com/V9cQQ0u7

  5. RavanH
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks Nick, I'll keep your code contribution ready for the next release :)

    Meanwhile, adding this code (slightly altered so it fires on document ready) to a sidebar text widget might already do the trick...

  6. denl
    Member
    Posted 1 year ago #

    I agree. I've just tried a lots of different lightbox plugins and this is my favourite, but I'm also looking for something that supports wordpress captions and descriptions.

  7. nickd32
    Member
    Posted 1 year ago #

    FYI - adding that code to the <head> section worked great!

    Here's my final version, modified per @RavanH 's suggestion.

    http://pastebin.com/5srPv35b

  8. Hawkman14
    Member
    Posted 1 year ago #

    Thanks Nick,
    Your script worked great

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic