WordPress.org

Ready to get started?Download WordPress

Forums

W3 total cache with parent/child theme css minifying (7 posts)

  1. Richard Vencu
    Member
    Posted 3 years ago #

    I got a wordpress installation with W3 Total Cache fully configured. While I have a pretty complex site, I was not able to fully minify all javascripts and css files.

    The worst problem is that I cannot include any partent theme css file into the minification or the styling gets broken. So I am stuck with about 9 css files from the parent theme that are left alone, not even gzip compressed like the child theme minified css file.

    Do you have any suggestion on how to improve things?

  2. Frederick Townes
    Member
    Posted 3 years ago #

    I'd like to look at your case, can you submit a bug submission form from the support tab of the plugin?

  3. Richard Vencu
    Member
    Posted 3 years ago #

    I just did it

  4. Richard Vencu
    Member
    Posted 3 years ago #

    One mention: all css files left outside are called with @import directive (first the style.css of the parent as in child theme development, then another 7 files from the parent theme's style.css (as developed in Hybrid theme)

  5. Frederick Townes
    Member
    Posted 3 years ago #

    @import is currently not handled by W3TC unfortunately. It will be in an upcoming release. FYI: this method is incredibly non-performant. Switch to using <link> if you can.

  6. Richard Vencu
    Member
    Posted 3 years ago #

    yes, i believe so, still I had to use a parent theme and play around the child theme. by definition the child theme is using the @import directive

    at some other case I found useful to remove all scripts and css files from header.php and insert them via functions.php by using 'register' and 'enqueue' commands and specify dependencies. I could avoid double loading of jquery library this way, also to conditionally upload some css files depending on the context. What do you think, is this method OK from the performance point of view? Is W3TC handling these files?

  7. Frederick Townes
    Member
    Posted 3 years ago #

    That method is fine. For now W3TC is only handling files objects either found via the help tool or those manually entered into the settings.

Topic Closed

This topic has been closed to new replies.

About this Topic