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

    (@smashballoon)

    Hey themightyant,

    There’s two ways you can remove the plugin’s built-in CSS file:

    1) Stop it from loading by removing the enqueue function from the plugin’s source file. Just open the plugin’s ‘instagram-feed.php’ file and on line 200 you’ll see the following line:

    wp_enqueue_style( 'sb_instagram_styles' );

    Either remove that or comment it out.

    Please note that using method 1 will mean that if you update the plugin then you’ll overwrite this change. Another method which wouldn’t be overwritten is below.

    2) Remove the CSS file via JavaScript. This isn’t as efficient but would mean that you wouldn’t have to remake the change if you update the plugin. Just add the following to the plugin’s Custom JavaScript section, which is on the plugin’s Customize page:

    $('#sb_instagram_styles-css').remove();

    Let me know whether either of those methods work for you.

    John

    Hi,
    I am having the same issue. I would like to remove the css using functions.php, so it’s not lost on an update.
    Do you know how to do that?

    Thanks,
    Jenny

    Plugin Author smashballoon

    (@smashballoon)

    Hey Jenny,

    If you use method #2 described above then it won’t be removed on an update as it’s saved in the plugin’s settings.

    If you want to use your functions.php file specifically then you should be able to use wp_dequeue_style( 'sb_instagram_styles' ); to dequeue the stylesheet there instead.

    Let me know whether that solves the problem for you, and I hope you have a great weekend!

    John

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Disable Plugin CSS’ is closed to new replies.