Remove visual composer css from single on mobile theme

Posted in: Newspaper
Post count: 268

Hi

to speed up result on google speed on mobile i want at least hide js_composer.min.css
from single post on mobile theme

<link rel=”stylesheet” id=”js_composer_front-css” href=”http://www.bintmusic.it/wp-content/plugins/js_composer/assets/css/js_composer.min.css?ver=7.4&#8243; type=”text/css” media=”all”>

on desktop i added the follow on function.php and this work

function dequeue_visual_composer_css() {
if (is_single()) {
wp_dequeue_style(‘js_composer_front’);
wp_dequeue_style(‘td-vc-composer-css-shim’);
}
}
add_action(‘wp_enqueue_scripts’, ‘dequeue_visual_composer_css’, 1003);

but js_composer.min.css remains on single articles on mobile theme

I’ve try to put dequeue on function.php on mobile theme but does not work.

How can i do?

Thanks

Post count: 23312

Hello Bintmusic,

Please try to adjust your code after the following topic and try this way and check the results -> https://forum.tagdiv.com/topic/dequeue_visual_composer/

Hope this helps!

Thanks for the message!

Post count: 268

Hi Catalin

perfect, it works!!

For mobile theme remain only what follow to solve “Delete JavaScript and CSS that block the view in above-the-fold content” on Google Speed test

http://www.site.com/…gins/cookie-notice/css/front.css?ver=7.4
http://www.site.com/…hemes/Newspaper/mobile/style.css?ver=7.4

Thanks!

Post count: 22421

Hello,

We have not tested speedbooster with the mobile theme so we cannot say for sure if it will move the render blocking css and js from the mobile theme. If it does not, you should find other methods of doing it as I cannot say for sure if it will work with speedbooster.

Thank you!

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.