1

I am trying to edit the style.css file for a Wordpress theme, however the changes I make (via admin or ftp) are not reflected on the site because that is using style.min.css. It is very cumbersome manually minifying the css everytime I make small edits. I'd also like to be able to make quick changes in the admin Editor GUI.

What would be the practice practice to do this? Should not style.min.css be auto-generated?

1
  • I thought this would be a case of hooking the 'styles.css updated' event in your theme functions when in admin mode, and then running the minify task (carefully, w.r.t. filesystem access) but there isn't an event: neither on the save nor the update notification :-( There's an event for practically everything else.
    – Rup
    Commented Dec 8, 2014 at 14:05

1 Answer 1

1

Best practice is to use a child theme instead.

A plugin like Simple Custom CSS is another option.

Two alternate quick fixes:

  1. Disable the filter that selects style.min.css by commenting out this line in origin/library/function/styles.php:

    add_filter( 'stylesheet_uri', 'hybrid_min_stylesheet_uri', 10, 2 );

  2. Delete style.min.css :)

There is no auto-generation of minified files within WordPress.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.