Any ways to remove all default stylesheet?

Support Meta Box AIO Any ways to remove all default stylesheet?Resolved

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #29717
    LULU
    Participant

    Hi
    I use AIO to setup my form.
    are there any ways to disable loaded css files?
    thank you

    #29721
    Long NguyenLong Nguyen
    Moderator

    Hi,

    What do you mean by "disable loaded CSS files"? Are the CSS files to show the form? You can override the style by using your CSS code.

    #29722
    LULU
    Participant

    I mean all the css files like columns.css / tabs.css ...
    I do not need those css file.

    #29726
    Long NguyenLong Nguyen
    Moderator

    Hi,

    Each field or extension will load its script files (CSS or JS) when showing on the page. You can find here https://github.com/wpmetabox/meta-box/tree/master/css

    So it is not encouraged to disable the code-based CSS of our plugin to keep them work properly. If you want to do, this article might help you accomplish that https://digwp.com/2019/03/disable-script-style-added-plugins/

    #41628

    The frontend-submission extension load all the styles and scripts from the other extensions no matter we use them or not (tabs, groups, columns, etc.). This is kinda of a lazy implementation and not what i expect from you.

    #41629

    You can use this and call it with some hooks provided by the extension

    		// Unload default styles loaded by the plugin
    		wp_deregister_style( 'rwmb-group' );
    		wp_deregister_style( 'rwmb-tabs' );
    		wp_deregister_style( 'rwmb-columns' );
    		wp_deregister_style( 'mb-tooltip' );
    
    		// Unlaod default scripts loaded by the plugin
    		wp_deregister_script( 'rwmb-group' );
    		wp_deregister_script( 'mb-show-hide' );
    		wp_deregister_script( 'rwmb-tabs' );
    		wp_deregister_script( 'mb-tooltip' );
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.