Unneeded js_composer_front-css

Posted in: Newspaper
Post count: 9

Hello,

I’m trying to get rid of Visual Composer on the posts that don’t need it. After looking through the code I’ve noticed that both VC’s js and css files should be loaded only when VC content is present. While this works perfectly fine with js, css is loaded on every page. Digging further I’ve also found that /includes/wp_booster/td_wp_booster_functions.php seem to have VC’s css file loading hardcoded. Is that some kind of workaround for a bug in VC/Newspaper? Is there a way to get rid of unneeded css file?

Thanks!

Post count: 22421

Hi,
Unfortunately we have no easy solution for this as there is no unneeded css loaded. Every file is required somewhere. Disabling loaded files will have mixed results and we do not recommend it. You could remove this line from booster_functions and it will remove the front css but we have not tested this and you need to inspect if there will be consequences to this:
http://screencast.com/t/nn6vGsvn
Thank you!

Post count: 9

Thank you! I’m just confused why you’ve chosen to include it, since it’s already called in VC files, and there it’s conditional, as far as I see. I’m going to add if (!is_single()) around it, I guess, and see what happens.

Post count: 22421

Hi,
The code was added manual in case something went wrong with visual composer and the stylesheet did not load. In the current version though visual composer updated their plugin and this code can be removed. We will also remove it from the theme in the future version if it proves to do nothing else. We will further test this issue.
Thank you!

Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.