Support » Plugin: NextGEN Gallery Optimizer » Fancybox doesn't work on Calendar Page

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Mark Jeldi


    Hey Bruno,

    Good to hear from you again!

    I’ve been looking into your Calendar page, and I believe the reason Fancybox isn’t loading is due to the dynamic “More Info” dropdown the images are contained in. At a guess, it seems you’ve either got your NextGEN shortcode nested within another plugin’s shortcode for the effect, or it’s being inserted via a direct do_shortcode() call.

    Unfortunately, it’s not currently possible in WordPress to detect if either of these methods are used on a page before the head section is loaded (re: Optimizer’s FAQ), and loading the extra lightbox scripts sitewide would defeat the purpose of the plugin.

    However, I’ve recently come up with a solution whereby if you tell Optimizer where you want the necessary scripts to run, it will both load them conditionally in the head where they won’t break, and only on the pages you specify (not sitewide). I’m currently working on a conditional-building form for the plugin’s settings page, but until then, I’ve just emailed you a custom conditional function that will load the Fancybox lightbox scripts and styles on your Calendar page only (in addition to your pages with regular shortcodes).

    Hope this helps!


    Hi Mark,

    I’ve problems to integrate a nextgen gallery in combination with the Collapse-O-Matic plugin.

    Some words about the Collapse-O-Matic plugin: “Remove clutter, save space. Display and hide additional content in a SEO friendly way. Wrap any content—including other shortcodes—into a lovely jQuery expanding and collapsing element.”

    Here the link to my page:

    As you see the images are not shown in a fancybox.

    This is the code I use on the page:
    [expand title=”4 Jahre Neidclub Fulda” id=”r2d2wiki”][nggallery id=4]<spanhighlight”>scroll-to-trigger” id=”bot-r2d2wiki”>click here to close</span>[/expand]

    The link to the Collapse-O-matic documentation:

    Kindly take a view on my page.
    Maybe you know what to do 🙂

    Thanks in advance.

    Best regards,

    Plugin Author Mark Jeldi


    Author’s note:

    Issue resolved via email using an extended conditional statement to load the necessary scripts and styles on pages using the dynamic Collapse-O-Matic functionality.

    This was necessary as it’s not currently possible in WordPress to detect if a nested shortcode is actually present on a page before the head section is loaded, as it’s processed much later than the main/outer shortcode, using a secondary do_shortcode() call. This is very similar to the Calendar page example in the original issue at the top of this thread, and fortunately the same solution works equally well.


Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fancybox doesn't work on Calendar Page’ is closed to new replies.