• Resolved ODAK71

    (@odak71)


    How can I prevent stardard plugin CSS is loading in frontend.

    define('NGG_SKIP_LOAD_SCRIPTS',TRUE);

    or

    add_action('wp_print_styles', 'wpse_82982_removeStyles');
    
    function wpse_82982_removeStyles() {
        wp_dequeue_style('NextGEN');
        wp_dequeue_style('shutter');
    }

    not working

    (newest version breaks my custom ngg css)

Viewing 9 replies - 1 through 9 (of 9 total)
  • Benjamin

    (@benjaminowens)

    Hi @odak71

    The constant should be all you need to need to stop NextGEN adding scripts or styles to the frontend. If anything is being enqueued anyway please let me know.

    Thanks!

    Thread Starter ODAK71

    (@odak71)

    I add

    define('NGG_SKIP_LOAD_SCRIPTS',TRUE);

    to wp-config.php,

    but

    <link rel='stylesheet' id='nextgen_widgets_style-css' href='https://my.domain.net/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/widget/static/widgets.css?ver=3.22' type='text/css' media='all'/>
        <link rel='stylesheet' id='nextgen_basic_thumbnails_style-css' href='https://my.domain.net/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_gallery/static/thumbnails/nextgen_basic_thumbnails.css?ver=3.22' type='text/css' media='all'/>
        <link rel='stylesheet' id='nextgen_basic_slideshow_style-css' href='https://my.domain.net/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_gallery/static/slideshow/ngg_basic_slideshow.css?ver=3.22' type='text/css' media='all'/>

    will be added to the frontend anyway.

    Plugin Contributor Imagely

    (@imagely)

    Hi @odak71,

    Could you please access "NextGen Gallery -> Other Options -> Lightbox Effects" and select"None" for the "What lightbox would you like to use?" then "Save Options" to see if that’ll remove the above mentioned resources?

    Thread Starter ODAK71

    (@odak71)

    I use a third party lightbox (easy fancybox)

    The constant NGG_SKIP_LOAD_SCRIPTS should disable including of css and scripts.

    Lightbox: Own and class="fancybox" rel="%GALLERY_NAME%"

    Thread Starter ODAK71

    (@odak71)

    If I disable the lightbox, the css und scripts are not added. But I need my own lightbox.

    Thread Starter ODAK71

    (@odak71)

    In combination of NGGs build in fancybox and NGG_SKIP_LOAD_SCRIPTS works now.

    Thread Starter ODAK71

    (@odak71)

    Solved.

    Thread Starter ODAK71

    (@odak71)

    On an other Website the same procedure did not work. There the CSS and scripts will add furthermore

    Thread Starter ODAK71

    (@odak71)

    after a lot of try now its working on the second project too. I need to fill in the custom facy code field with a single blank, then with not any input, then switch to ngg build in fancybox code.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Disable CSS in frontend’ is closed to new replies.