• Resolved cag8f

    (@cag8f)


    Hello. I have the Master Slider plugin installed. I have created several sliders with it, and inserted those sliders onto several pages. I have *not* inserted a slider onto my home page. But your plugin still loads two CSS files onto my home page (actually, onto every page, it seems like):

    masterslider.main.css
    custom.css

    Is there a way to ensure these files are loaded only on the pages that display a slider?

    Thanks.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor averta support

    (@averta_support)

    Hi,

    Thank you for choosing Master Slider.

    There is no way to do that and those two files will be loaded.

    You can use optimization plugins like Autoptimize plugin.
    In this way, files will be merged and load once, so it won’t decrease the loading time.

    If you need any further information, please let me know.

    Best,

    Thread Starter cag8f

    (@cag8f)

    OK thanks for confirming. What if I added my own custom PHP code to dequeue these two stylesheets on my homepage (see the below code). Would you see any issues if I did that?

    if (is_front_page()) {
      function project_dequeue_unnecessary_styles() {
          wp_dequeue_style( 'master-slider-handle1' );
          wp_dequeue_style( 'master-slider-handle2' );
      }
    }
    add_action( 'wp_print_styles', 'project_dequeue_unnecessary_styles' );
    Plugin Contributor averta support

    (@averta_support)

    Hi again,

    Sorry for the delay in replying.

    No it’s ok to do that.

    Please do not hesitate to ask anything else.

    Have a great weekend.

    Thread Starter cag8f

    (@cag8f)

    OK thanks. I did so, and there were no issues. We can consider this resolved.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to prevent unnecessary Master Slider CSS files from loading?’ is closed to new replies.