• Resolved jugibur

    (@jugibur)


    Hi,

    under design preferences, I have set the design style to “none”.

    Unfortunately, the file “forminator-gird.open.min.css” is still loaded with some unsightly basic settings.

    Why is the “none” setting ignored here? I would like to integrate my own styles and not have to overwrite them first. The disadvantage is that the Forminator stylesheet file requires another server request, which is unnecessary if you don’t need the styles in it.

    Would be great this could be fixed!

    Nonetheless, this is an excellent plugin, thanks for the work!

    Juergen

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Laura – WPMU DEV Support

    (@wpmudevsupport3)

    Hi @jugibur,

    Hope this message finds you well and thanks for your feedback, we really appreciated it.

    We have a mu-plugin that will prevent any Forminator CSS:

    <?php
    
    add_action( 'plugins_loaded', function() {
    	if ( ! defined( 'FORMINATOR_VERSION' ) ) {
    		return; // Forminator is not installed/enabled.
    	}
    	// Current form ID:
    	add_action( 'forminator_after_form_render', function( $form_id, $form_type, $post_id, $form_fields, $form_settings ) {
    		$GLOBALS['__fmt_current_form'] = $form_id;
    	}, 10, 5);
    	// Forminator styles:
    	add_filter( 'the_content', function( $content ) {
    		$styles = [
    			'forminator-module-css-' . ( $GLOBALS['__fmt_current_form'] ?? '0' ),
    			'forminator-icons',
    			'forminator-utilities',
    			'forminator-grid-default',
    			'forminator-forms-default-base',
    			'intlTelInput-forminator-css'
    		];
    		foreach( $styles as $handle ) {
    			if ( wp_style_is( $handle ) ) {
    				wp_dequeue_style( $handle );
    			}
    		}
    		return $content;
    	}, 11 );
    });

    You can follow this guide to install it as a mu-plugin: https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins. Let us know the result.

    Best regards,
    Laura

    Thread Starter jugibur

    (@jugibur)

    Thank you Laura for your quick reply, I will give it a try!

    Best regards,
    Juergen

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Remove default css (“forminator-grid.open.min.css”) completely’ is closed to new replies.