Title: Exclude html from minify
Last modified: July 27, 2022

---

# Exclude html from minify

 *  Resolved [Ben Andersen](https://wordpress.org/support/users/ben72/)
 * (@ben72)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/exclude-html-from-minify/)
 * How can I exclude a specific html file from minify?
    I have a specific plugin
   which does not work with minify html enabled.
 * Thanks!

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

 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/exclude-html-from-minify/#post-15865570)
 * Hi,
 * unfortunately there is no such way
 * you may need to set HTML minify OFF
 * Best regards,
 *  Thread Starter [Ben Andersen](https://wordpress.org/support/users/ben72/)
 * (@ben72)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/exclude-html-from-minify/#post-15866118)
 * Thank you for your reply [@qtwrk](https://wordpress.org/support/users/qtwrk/)!
   
   So do you think it’s a problem in the code that could potentially be fixed to
   make minify html work?
 * Thanks.
 *  [serpentdriver](https://wordpress.org/support/users/serpentdriver/)
 * (@serpentdriver)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/exclude-html-from-minify/#post-15866487)
 * [@ben72](https://wordpress.org/support/users/ben72/)
 * There must be other reason why this plugin doesn’t work if HTML minify is ON.
   To minify HTML only means that line breaks and double spaces are removed. HTML
   minify doesn’t change the code.
 *  Thread Starter [Ben Andersen](https://wordpress.org/support/users/ben72/)
 * (@ben72)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/exclude-html-from-minify/#post-15866593)
 * Then there is a conflict with the FacetWP plugin when I use it in one case. Where
   should I report this?
 *  [serpentdriver](https://wordpress.org/support/users/serpentdriver/)
 * (@serpentdriver)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/exclude-html-from-minify/#post-15866628)
 * There is not a real conflict and nothing has to be reported. You must either 
   exclude specific requests from being cached or from optimizing. Maybe plugin 
   support can tell you what exactly has to be done.
 *  Thread Starter [Ben Andersen](https://wordpress.org/support/users/ben72/)
 * (@ben72)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/exclude-html-from-minify/#post-15866664)
 * I got this response from FacetWP:
    FacetWP uses `<!--fwp-loop-->` HTML comments
   to detect the post loop and add a facetwp-template class. HTML minification removes
   that HTML comment causing the issue.
 * If it is the same issue, the fix would be to not use HTML minification, or to
   add the facetwp-template class manually, as described in above link.
    Or, if 
   Lite Speed Cache provides a way, exclude HTML comments from being removed.
 * Maybe Litespeed could avoid removing `<!--fwp-loop-->`?
 * Thanks.
 *  [serpentdriver](https://wordpress.org/support/users/serpentdriver/)
 * (@serpentdriver)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/exclude-html-from-minify/#post-15866683)
 * This is not good if detection is done with comments because removing comments
   is also part of HTML minify. In this case you can’t use HTML minify function,
   but this is not a bug or a malfunction of the cache plugin. Minifying HTML always
   removes comments and is like a “standard”. Maybe plugin support has any idea 
   to add a filter that prevents removing of comments.
 * Maker of this plugin should find any other solution for detection, because each
   plugin for optimization works like LiteSpeed cache plugin if it has a function
   for HTML minify.
    -  This reply was modified 3 years, 10 months ago by [serpentdriver](https://wordpress.org/support/users/serpentdriver/).
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/exclude-html-from-minify/#post-15879236)
 * Hi,
 * well , there isn’t really any “filter” or “exclude”
 * but I will advice our devs for such case
 *  Thread Starter [Ben Andersen](https://wordpress.org/support/users/ben72/)
 * (@ben72)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/exclude-html-from-minify/#post-15896238)
 * Thanks!
 * I got it solved by adding a css-class manually.
 * From the facetwp devs:
    _Maybe LiteSpeed Cache developers could consider adding
   a hook to (a) prevent comments from getting stripped, or (b) whitelist specific
   comment tags. FacetWP’s automatic query detection on WP archive pages and pages
   with custom queries requires the HTML comment for the frontend Javascript to 
   add the “facetwp-template” class. But you can easily circumvent this by adding
   the facetwp-template class manually to the div around your loop. You can then
   use HTML minification.

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

The topic ‘Exclude html from minify’ is closed to new replies.

 * ![](https://ps.w.org/litespeed-cache/assets/icon-256x256.png?rev=2554181)
 * [LiteSpeed Cache](https://wordpress.org/plugins/litespeed-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/litespeed-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/litespeed-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/litespeed-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/litespeed-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/litespeed-cache/reviews/)

 * 12 replies
 * 3 participants
 * Last reply from: [Ben Andersen](https://wordpress.org/support/users/ben72/)
 * Last activity: [3 years, 10 months ago](https://wordpress.org/support/topic/exclude-html-from-minify/#post-15896238)
 * Status: resolved