WordPress.org

Ready to get started?Download WordPress

Forums

NextGEN Gallery Optimizer
[resolved] Turn off Optimizer only use fancybox (2 posts)

  1. nickfmc
    Member
    Posted 1 year ago #

    Hi there, I'm trying to use your plugin, however I am calling the nextgen galleries using an "Advance Custom Field" plugin and also using the shortcode in a text widget in the sidebar. The issue is the optimization prevents the nextgen scripts from loading as it doesn't "See" these galleries, I have verified this is the issue as when I add a gallery to my WYSIWYG editor all of the other galleries on the page "sidebar" and "ACF" one start to work.

    any ideas?

    http://wordpress.org/extend/plugins/nextgen-gallery-optimizer/

  2. Mark Jeldi
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Nick,

    Thanks for using NextGEN Gallery Optimizer!

    Unfortunately, it's not currently possible in WordPress to detect if a widget or do_shortcode() call (which processes shortcodes in themes and custom fields outside of the post content) is actually present before the head section of a page is loaded (re: Optimizer's FAQ). By the time they're discovered, it's too late to load the required scripts in the header (where they need to be to avoid breakage), and since the aim of Optimizer is to not load unnecessary scripts and styles on every page, this continues to be a work in progress.

    That said, I've recently come up with a solution whereby if you tell Optimizer which pages you want your scripts to load on, it will both insert them conditionally in the head where they won't break, and only on the pages you specify (not sitewide).

    If you could provide some more information (and maybe a link) about where you require the scripts to load (eg. homepage only, all Pages, posts by id or category) and the functionality (eg. slideshows, Fancybox or both), I'll write you a custom function that can be incorporated into Optimizer to accommodate this more advanced usage.

    Hope this helps!

    Cheers,
    Mark.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.