Is it possible to remove/disable ALL Hustle CSS?

I’m using a Hustle widget and need to integrate it into my site’s theme, which I already have a design for.

Hustle has built-in styles and an option to override colours, as well as an option for custom CSS.

However, is there a way to completely disable all the built-in styles of Hustle, so no fonts, no sizing, layouts or colours?

I want to be able to style this myself from scratch, just adding to nothing – rather than having to override and disable all the existing Hustle styling which is not only more time consuming, but creates very messy CSS.

Thanks!

  • Majid
    • Recruit

    Hey itsnotrocketsurgery,

    The following snippet will completely de-queue Hustle popup built-in style. Try adding this to your functions.php file or mu-plugin.

    function remove_hustle_css() {
    wp_dequeue_style( 'optin_front' );
    }
    add_action( 'wp_footer', 'remove_hustle_css' );

    Let me know if this is what you were looking for.

    Cheers,

    Majid

  • Nahid
    • Tech Support

    Hey there Thomas !

    Hope you are having a great day!

    Unfortunately, the above code isn’t functioning anymore as the Hustle plugin has been through some major changes recently. Adding the following code should serve the purpose:

    add_action( 'wp_head', 'remove_hustle_css' );
    function remove_hustle_css() {
    echo '
    <script>
    (function($) {
    $( document ).ready(function() {
    $( "style#hustle-module-styles" ).remove();
    });
    })( jQuery );
    </script>
    ';
    }

    Please try adding the above snippet of code in your primary site’s theme’s (more preferably, child theme‘s) functions.php file. Alternatively, you can also add the code in a mu-plugin. That’ll require you to paste the mentioned code in a PHP file that ends with the extension .php, e.g. “anyname.php“. The mentioned code should have a “<?php” definition at the start of the file. This PHP file should be placed in {your root WordPress folder}/wp-content/mu-plugins (you’ll need to create the folder named “mu-plugins” if it is not there already).

    Please note that the above snippet of code will not completely remove Hustle’s CSS but will do most of it, leaving behind some minor default styling. Our developers are working on introducing a more dynamic way to exclude Hustle CSS in the recent upcoming updates.

    Hope this helps. Let us know if this works for you. Thanks!

    Kind regards,

    Nahid

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.