Loading images twice have searched but no solution

Page: 1

Author Post
Member
Registered: Jul 2013
Posts: 2
This is a test page, so no one has (except here) seen it yet.

<admin>link removed</admin>

I wanted to test things first before implementing on a fairly complex project, but in my test -when clicked- TWO images are loading. I recognize that one is likely a slider built into the theme, but I'm attempting NOT to use that, is there anyway to force it to only use floatbox

The video loads fine (2nd image)

Once done I will have multiple tables on the page, each representing a separate project, so I do not want to use the gallery.

TABLE

COL1 - TEXT /// COL2 --- IMAGE LINK {floatbox] // COL 3 Video thumb linking to YT or VIMEO [floatbox]

Then that will repeat multiple times on the page for different submissions.

Any thoughts appreciated.
« Last edit by admin on Wed Jul 31, 2013 4:07 am. »
Administrator
Registered: Aug 2008
Posts: 3382
You have both Floatbox and Fancybox running on the page. There is fancybox script on the page which adds its markup to your image links and the linked image is shown by both libraries because the markup to do so is present. The code that assigns fancybox behaviour includes the line
thumbnails.addClass("fancybox").attr("rel","fancybox").getTitle();
and results in a link such as
<a href="image.jpg" class="floatbox fancybox" rel="fancybox" title="">...</a>
The linked image is shown by Fancybox and by Floatbox simultaneously, as requested by the markup.

Ideally, remove fancybox.js and its associated script elements from the page and what will remain will be the single display in Floatbox as you desire. Poking around in the fancybox script it looks like it will ignore any links that have a class of "nolightbox" on them, so assigning that class may be an alternative approach. This has nothing to do with Floatbox so I can't help if it doesn't work.

If fancybox is baked into your WordPress theme and you don't know how to control or remove it, and either don't know how to assign the "nolightbox" class or that doesn't work, you would need to seek assistance from the theme's provider, Fancybox support, or perhaps a general WordPress support channel.
Member
Registered: Jul 2013
Posts: 2
Thanks...

Found the answer in Wordpress support

function disable_fancybox() {
if (is_page('Sample Page')) {
remove_action('wp_print_scripts', 'mfbfw_load');
remove_action('wp_print_styles', 'mfbfw_css');
remove_action('wp_head', 'mfbfw_init');
}
}
add_action('wp_head', 'disable_fancybox', 1);

that fixed it. If you check that URL now floatbox works fine. See you removed the link, so won't post it again, but all is good.

Page: 1