• Resolved myrok24

    (@myrok24)


    Hi, when i click on a image, from a set of two in total, the fancybox opens just fine.
    But when i navigate in the box, it shows duplicate images, so four in total. I checked the library and there are no duplicates there.

    Im using fancybox in a wordpress them called “Cudazi Mono”.

    Anyone familiair with this strange problem?

    thnx!

    https://www.ads-software.com/extend/plugins/easy-fancybox/

Viewing 11 replies - 1 through 11 (of 11 total)
  • got a link?

    Thread Starter myrok24

    (@myrok24)

    You have the thumbnail images wrapped in double anchor tags:

    <a href='https://www.popvanstof.nl/tijdelijk/wp-content/uploads/2011/09/gijsdetail.jpg'>
    <a href='https://www.popvanstof.nl/tijdelijk/wp-content/uploads/2011/09/gijsdetail.jpg' title='gijsdetail'>
    <img width="642" height="426" src="https://www.popvanstof.nl/tijdelijk/wp-content/uploads/2011/09/gijsdetail-642x426.jpg" class="attachment-grid_8" alt="gijsdetail" title="gijsdetail" />
    </a>
    </a>

    (notice the double <a href=... at the start and double </a></a> at the end)

    It’s some sort of slides function in your theme that automatically creates these links? If you can change the above example (same goes for the second one) to the following, FancyBox will no longer show double images:

    <a href='https://www.popvanstof.nl/tijdelijk/wp-content/uploads/2011/09/gijsdetail.jpg' title='gijsdetail'>
    <img width="642" height="426" src="https://www.popvanstof.nl/tijdelijk/wp-content/uploads/2011/09/gijsdetail-642x426.jpg" class="attachment-grid_8" alt="gijsdetail" title="gijsdetail" />
    </a>
    Thread Starter myrok24

    (@myrok24)

    hmm strange.. yeah if it isn’t a fancybox code, then i must seek into the theme ccode i’m afraid.

    Thnx for finding the problem’s source anyway.

    rmj.86

    (@rmj86)

    Hi myrok24

    I’m having the same issue with the same theme as you’ve used, did you resolve the problem? If so can you explain how?

    Thanks

    wwww.beckyjones.co.uk

    Thread Starter myrok24

    (@myrok24)

    @ rmj.857

    I’m not 100% certain if this is what i did, but it was solved by a simple setting in the “media settings” –> fancybox part.

    To be more specific: Under “Links”, set the “Exclude” dropdown to –> “Empty (hidden) links” instead of the default “none” setting.

    Let me know if it worked out ??

    I’ve downloaded the Mono theme to take a look and as far as I can tell it’s in the function cudazi_attachment_gallery. You can find that in the file /mono/libraries/attahment-gallery.php

    On line 55 you see

    $output .= "<div class='post-thumbnail'><a href='" . $post_thumbnail_src[0] . "'>";

    Change it to $output .= "<div class='post-thumbnail'>"; and on line 57 you see

    $output .= "</a></div>";

    and change that to $output .= "</div>";

    myrok24, that’s brilliant! I did not even expect that option in my own plugin to do the job in this case but you are right, that should work ??

    Thread Starter myrok24

    (@myrok24)

    Haha.. You’re welcome ??

    rmj.86

    (@rmj86)

    myrok24, I can’t thank you enough, it worked brilliantly and saved me hours of pulling my hair out

    Thanks again ??

    Wow, I faced with the same problem and I thought there would be kind of tough solution for it. But this found way is exactly what I needed. Thanks to RavanH and myrok24!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Plugin: Easy FancyBox] Shows double images in navigation’ is closed to new replies.