July 21, 2016 at 8:03 pm #6159
Hello, I had AMTS working well and appreciated. Then I took advice and began working on minifying my CSS theme files, including removing all CSS comments such as “Theme Name.” This appears to break function of plugin.
Is there any way to fully minimize theme CSS and still use AMTS?
Thanks for any ideas or help.
MobiJuly 22, 2016 at 3:17 am #6160
I think you removed the comments in your style.css of your theme file. Please don’t do that. Those comments are most important for theme to work. So after removing the theme if means that there is no proper information of your theme. So it is not working. Please check this https://codex.wordpress.org/Theme_Development#Theme_Stylesheet . Here you will find infos about it. And technically these are the comments you shouldn’t remove.
ThanksJuly 23, 2016 at 2:34 pm #6169
Ok, thanks, I’ve since learned that it is impossible to fully static minify a WordPress theme css file, due to the necessity of the header comment stating the name of the theme, and the fact that full minification deletes all comments. I did discover that WordPress theme css file (usually style.css) only needs one comment at the beginning and the rest can by minified. If anyone lands here looking for information, the only comment that’s necessary would look like this, located at exact beginning of the css file:
/* Theme Name: this-is-the-theme-name */
I hope that helps someone looking for info.July 24, 2016 at 11:04 am #6173
Thank you so much for sharing the info here. Hope this will help other having such issue.
The topic ‘Minification breaks plugin’ is closed to new replies.