• Resolved Dan14

    (@dan14)


    I had to minify certain css that is currently only needed in posts and 2 pages. Is it possible to load the minified css (minify and combine) file only in posts and specific pages?

    Or alternatively, how can I disable the combine and minify css in specific posts/pages?

    • This topic was modified 3 years, 3 months ago by Dan14.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @dan14

    Thank you for reaching out.
    There is no option in W3TC to only minify files on a specific page. You can, however, disable modification on a single page by excluding that page from being minified.
    You can do this in Performance>Minify>Advanced>”Never Minify Following pages”
    If the page you wish to remove from being minified is for example https://yourwebsite.com/some-page/ simply add /some-page/ to Never Minify Following pages field, save all settings and purge the cache.
    I hope this helps!
    Thank you!

    Thread Starter Dan14

    (@dan14)

    Thank you for your reply.

    This will also disable html minification? If yes, is there no way just to exclude css combine and minify from specific pages?

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @dan14

    Yes, this will entirely disable minify on the single page.
    Not for specific pages, no. If those files are loading only on two pages and not loading on any other page you can exclude those files from being minified in Performance>Minify>Advanced>Never Minify Following CSS files
    This will exclude the file from being minified completely.
    Simply add the URL of the file to the mentioned field for example:
    https://yourwebsite.com/wp-content/themes/some-theme/assets/css/some-css-file.css
    This way the files will be excluded from Minify.
    Thanks!

    Thread Starter Dan14

    (@dan14)

    Thank you for your reply.

    I tried it, how do I apply do not minify this page for the homepage?

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @dan14

    Thank you for your question,
    You can add / in ”Never Minify Following pages”
    so if you want the homepage not minified and some other page you can add both like this:

    /
    /some-page/

    Thanks!

    Thread Starter Dan14

    (@dan14)

    Thank you

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Load minify css only in posts’ is closed to new replies.