Easy FancyBox
Auto-open Easy Fancybox (5 posts)

  1. jerominrebatet
    Posted 3 years ago #


    After having several problem, here's my last one...
    It keeps opening the first image of a gallery, not the one in the url (with the ID).
    There's a link "URL" with each pictures to get the ID.
    I can't find any option allowing me to change this setting.
    I want the auto open but only if an ID is passed by the url with the "#".

    Thank you for your help ;)


  2. RavanH
    Plugin Author

    Posted 3 years ago #

    Sorry, you are misunderstanding the use of id="fancybox-auto". You can only use this attribute once on each page. And it will cause that image to open on each page refresh independent of whatever hash tag is appended to the page URL.

    If you want to make hash values trigger fancybox you'll have to put some extra code in a text widget:

    <script type="text/javascript">
    window.onload = function() {
        if(window.location.hash) {

    And change all those id="fancybox-auto" attributes so that each one has a unique value. But do not use a strictly numeric value. Use something like id="img270", id="img271" etc. or even unique names... and use corresponding hash values in the URL like http://www.starbasket.fr/photos-des-camps/camps-2007/la-baule-5/#img729

  3. jerominrebatet
    Posted 3 years ago #

    Actually,2 days ago, it works perfectly, but i had a compatibility problem with a plugin ...I also use nextgen-gallery.

    Now everythings works fine except the fact I can access an image with is ID in url.

  4. RavanH
    Plugin Author

    Posted 3 years ago #

    Your theme is incompatible as it includes its own FancyBox script.

  5. charlcfc
    Posted 3 years ago #

    Hi jerominrebatet

    Do you mind sharing the custom code you added to your fancybox for the link sharing and the copier code?


Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic