• Resolved agencefreez

    (@agencefreez)


    Hi,

    I have an empty css file (js_composer/custom.css), and it’s generating a second css with “/*FILESTART*/” in it while optimized by autoptimize.

    Why is it doing this? Couldn’t it just add everything in one css?

    Cause my theme has visual composer installed and now I’m using it but I can’t add css in the custom file (I think the author of the theme did hide that possibility).

    Thank you.

    https://wordpress.org/plugins/autoptimize/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Frank Goossens

    (@futtta)

    probably because js_composer/custom.css is for a different media-type, in which case AO respects that. Maybe exclude js_composer/custom.css from optimization?

    frank

    Thread Starter agencefreez

    (@agencefreez)

    Thanks for the fast answer,

    Yes it’s “screen” instead of “all” unfortunately I can’t change that.

    I did exclude it, but I still have a empty css file.

    Maybe there is a function to solve that?

    Plugin Author Frank Goossens

    (@futtta)

    Maybe there is a function to solve that?

    currently not, I’m afraid.

    frank

    Plugin Author Frank Goossens

    (@futtta)

    although .. if you’re into developing you could use the API (specifically the “autoptimize_html_after_minify”-filter) to str_replace the offending “<script src=”-line with “”? a bit hackish, but it would work 🙂

    frank

    Thread Starter agencefreez

    (@agencefreez)

    Finally, I just removed the style adding this in my function.php :

    add_action( ‘wp_print_styles’, ‘my_deregister_styles’, 100 );
    function my_deregister_styles() {
    wp_deregister_style( ‘js_composer_custom_css’ );
    }

    I’ll never use this css anyway so for me it’s the best option.

    Thank you for the support and this awesome plugin !

    Plugin Author Frank Goossens

    (@futtta)

    ah, the joys of dequeueing! 😉

    thanks & have fun,
    frank

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

The topic ‘/*FILESTART*/ and 2nd css file’ is closed to new replies.