WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: NextGEN Gallery] How to use NGG_SKIP_LOAD_SCRIPTS properly? (4 posts)

  1. micasuh
    Member
    Posted 3 years ago #

    I love that this functionality is now built into NextGEN but I want to know the proper use of this function. I've been looking for something like this for a while.

    For instance, I'd love to use this on a website to block scripts/css from loading on any page which isn't used by NextGEN gallery. However, as Alex has said a couple of times on the forums, adding this to the wp-config.php file will completely stop scripts from loading.

    First, does it prevent just JS or does it also prevent CSS from loading?

    Second, can this be used to only allow scripts to be loaded on certain pages and not on others? Or is this an all or nothing function?

    I'm not the first one who wants to know this answer! Thanks for your help!

  2. Alex Rabe
    Member
    Posted 3 years ago #

    The constant just block script loading, CSS can be disabled via Style page

  3. Alex Rabe
    Member
    Posted 3 years ago #

    If you just want to block a page where is NGG not used, you need to parse the content in advance, here is a good resource how you can do that :

    http://wpengineer.com/1949/load-a-stylesheet-only-if-use-gallery/

  4. numaga
    Member
    Posted 3 years ago #

    How can I disable the CSS via the style page? If it really is that easy, why not make it an option in the admin panel.

    - TICKBOX - make NextGEN Gallery only load it's scripts and CSS when there's actually a gallery on the page.

    It would reduce server load for the people who really need it and are not coding guru's like yourself! ;)

Topic Closed

This topic has been closed to new replies.

About this Topic