WordPress.org

Ready to get started?Download WordPress

Forums

Easy FancyBox
[resolved] EFancybox take "alt" instead of "title" for the images (5 posts)

  1. Tegomass
    Member
    Posted 2 years ago #

    Hello,

    First, sorry for my bad english :p

    I have installed this plugin and i like it, but i saw, when i used this code: [gallery link="file"], my gallery is correctly displayed, the title of my image is what i type in 'title'.
    But when i put a image in between my post, like that "blablabla <img src='qsdf.jpg' title='beautiful image' alt='true123' width='50' height='50' /> blablabla", the fancybox show me my image and just below, it show me "true123" instead of "beautiful image".
    I tried to check or uncheck that 'Allow title from thumbnail alt tag' but it doesn't work...
    Can you help me please?

    Thank you.

    Tegomass

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

  2. RavanH
    Member
    Plugin Author

    Posted 2 years ago #

    Fancybox takes the title from the LINK tag title attribute or (if there is none) the IMG tag alt attribute.

    It should look like this:

    <a href='...' title='beautiful image' class='...'>
    <img src='qsdf.jpg' alt='true123' width='50' height='50' />
    </a>
  3. Tegomass
    Member
    Posted 2 years ago #

    ow Ok, it work, thank you very much.

  4. Tegomass
    Member
    Posted 2 years ago #

    last question, how can i do for fancybox take the title of the image instead of the title of the link please?

    <a href='...' class='...' title='title of the link'>
    <img src='qsdf.jpg' title='title of this image' alt='true123' width='50' height='50' />
    </a>

    Thank you very much !

  5. RavanH
    Member
    Plugin Author

    Posted 2 years ago #

    FancyBox will not take the title attribute from the image tag. FancyBox can only take the title from the title attribute of the link tag or (in case of absence of the link title AND when the option "Allow title from Alt" is checked) from the alt attribute of the img tag.

    So, in short: remove the title attribute of the link and:
    1. change the title attribute of the image to what you want to see as mouse-over tooltip and
    2. change the alt attribute of the image to what you want to see as title in FancyBox
    3. Enable "Allow title from Alt" on the Settings > Media page

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic