WordPress.org

Ready to get started?Download WordPress

Forums

Easy FancyBox
1st image clicked in Gallery in sidebar doesn't display title (2 posts)

  1. Lindsay Heydon
    Member
    Posted 3 months ago #

    I'm using your plugin and WP-Property which also uses fancybox. I've stopped their script being run on the property page.
    wp_deregister_script('wpp-jquery-fancybox');
    wp_deregister_script('wpp-jquery-fancybox-css');

    But I still have a small issue in that the first picture I click in the sidebar (and it can be any picture I click on) does not display the title. Do you have any pointers as to why this might be so I can investigate further.

    Many thanks.

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

  2. RavanH
    Member
    Plugin Author

    Posted 3 months ago #

    FancyBox takes the title from either the link "title" attribute or (when there is no title attribute) the thumbnail "alt" attribute. So your sidebar image link code should look like this for example:

    <a href="..." title="the title"><img src="..." alt="the backup title" /></a>

    But if the source code does not include any of these attributes, then there can be no title in the lightbox.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.