dequeue_style td-theme-demo-style

Posted in: Newspaper
Post count: 71

I need to remove this css
<link rel = 'stylesheet' id = 'td-theme-demo-style-css' href =' https: //www.******/wp-content/plugins/td-composer/legacy / Newspaper /includes/demos/style_pro/demo_style.css?ver=10.3.9.1 'type =' text / css' media = 'all' />

this file is empty and therefore I would like to remove it.

I tried so but don’t works (I’ve put the code in my functions.php child)

function dequeue_demo_style() {
wp_dequeue_style( 'td-theme-demo-style' );
wp_deregister_style( 'td-theme-demo-style' );
}
add_action( 'wp_print_styles', 'dequeue_demo_style', 1002 );

any idea?

Post count: 21065

Hello!

Once a demo is loaded the entire demo-style.css file corresponding to that demo will be loaded. If you remove the loading of this file, the demo will no longer receive the specific style. If you do not need to load css, you can simply use the cloud library and import the demo homepage and not use a demo at all on your install.
If you still want to remove the loading of the demo file, you can not do it from the child theme. You have to modify the main theme file:
td-composer/legacy/common/wp_booster/td_wp_booster_functions.php [line 414]

Hope that helps you somehow!

Thank you!

Post count: 71

Hi this is the content of demo_style.css

/* ----------------------------------------------------------------------------
responsive settings
*/
/* responsive landscape tablet */
/* responsive portrait tablet */
/* responsive portrait phone */
/*
Style Pro Demo
*/

If I modify the td_wp_booster functions.php every update I have to fix it right?

Post count: 21065

Hello @max!

Yes, you are right. You will have to change that file on every update because it will rewrite.

Thank you!

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