• Resolved joncampbell

    (@joncampbell)


    I am using an enfold child theme and when I try to exclude desktop.css it doesn’t seem to be excluded.

    I tried
    desktop.css
    assets/css/desktop.css
    assets/css/desktop

    The file is at /wp-content/themes/enfold-child/assets/css/desktop.css

    It doesn’t seem to make much sense but by having the desktop file autoptimized its messing with a bunch of styling.
    Thanks,

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    should work just fine normally. can you share your URL so I can have a look @joncampbell?

    Thread Starter joncampbell

    (@joncampbell)

    We had to turn the plugin off because of the issues.
    I am just testing it on my local.

    It seems to ignore any of the theme css files I put in the exclude box.

    Heres what I have in there right now:
    admin-bar.min.css, dashicons.min.css, assets/css/desktop, mobile-landscape.css, tablet-portrait.css

    But desktop.css, mobile-landscape.css, and tablet-portrait.css are all still being combined and optimized.

    I have cleared the cache when saving and also manually on the specific page.
    Tomorrow I may look and see if i can get any info out of the plugins filters that gives me more details about why the exclusion isn’t happening.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, keep me posted, I’ll be happy to assist somehow.

    Thread Starter joncampbell

    (@joncampbell)

    For some reason the css file that is being autoptimized isn’t in the tags that run through

    if ($this->isremovable($tag,$this->cssremovables)) {
    }

    that happens within the read() method of autoptimizeStyles.php

    I output each $tag within the isremovable() method and the tag for desktop.css doesn’t seem to show up, but that file does get optimized anyway?

    What am I missing?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    hmm … can you copy/paste the excerpt of the HTML where the css-file gets referenced?

    Thread Starter joncampbell

    (@joncampbell)

    I think I know what the problem is. The css is imported into style.css
    Style.css in the theme actually imports 7 other css files.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    that would indeed be the case, imported CSS is only skipped if it cannot be read from the filesystem.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Can’t exclude css file’ is closed to new replies.