Reply To: Help required with conflict

Your Account / Forums / Easy FancyBox Pro / Help required with conflict / Reply To: Help required with conflict

October 6, 2014 at 3:59 am #3646

Hi Darrin, no I was talking about a more recent reply via email. It was on the same day, 14 sept. as your original question. But I see now that I replied on an automated forum mail so it got sent to a noreply address and you will not have received it. My mistake.

So here it is:

OK, first thing I notice is that the jQuery library is loaded twice. Once all the way at the top of the head section, from and then later the WP one from … this is not a problem since all other jQuery extensions are loaded after that but it is redundant. You might want to make sure one of the two is removed.

Second thing I notice is the theme loads Slimbox, which is in fact an alternative for Fancybox. Is slimbow used for anything in particular? If not, is there an option in the theme to exclude it?

Still, this is not the reason for the double images in the gallery.

What is going wrong is this: notice the Save icon on top of each image? That is in fact a link to that same image but via another URL. FancyBox does not know it is meant for downloading and thinks it is just another image that should be included in the gallery.

The solution is to add a class to these download links: class=”nofancybox”. And there are two ways to do this…

Can you edit the theme? I mean, are you comfortable doing this? If so, then you might try to find the code responsible for creating these download link and add class=”nofancybox” to it. And you’ll have to do this on every new theme update.

If you rather not edit the theme then it should be possible to add some script (in a footer widget for instance) that does this on the client side. Something like:

<script type="text/javascript">
jQuery(document).ready( function($) {
    $('div.pwaplusphp_jq_save a').addClass('nofancybox');
} );

might do the trick…

Hope that helps 🙂