Sauter la navigation

[Résolu] Avoiding CSS import in terms of speed

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem:
The following external stylesheets were included in .../wp-content/cache/min/1/9f758f96fdb5c4c83c9909230aa32fea.css using @import.

.../wp-content/plugins/types/vendor/toolset/onthego-resources/onthego-styles/onthego-admin-styles.css
.../wp-content/plugins/types/vendor/toolset/onthego-resources/onthego-styles/onthego-buttons.css
.../wp-content/plugins/types/vendor/toolset/onthego-resources/onthego-styles/onthego-colors.css
.../wp-content/plugins/types/vendor/toolset/onthego-resources/onthego-styles/onthego-styles-helper.css
.../wp-content/plugins/types/vendor/toolset/onthego-resources/onthegosystems-icons/css/onthegosystems-icons.css

The users didn't want these styles to be loaded.

Solution:

Please add this code in your theme’s or child theme’s functions.php file to dequeue (remove) it on the frontend:

add_action('wp_enqueue_scripts', function() {
  wp_dequeue_style('toolset-notifications');
  wp_dequeue_style('onthego-buttons');
  wp_dequeue_style('onthegosystems-icons');
  wp_dequeue_style('onthego-colors');
  wp_dequeue_style('onthego-styles-helper');
  wp_dequeue_style('onthego-admin-styles');
   
}, 20);

Relevant Documentation:
https://codex.wordpress.org/Function_Reference/wp_dequeue_style
http://inspirationalpixels.com/tutorials/remove-plugin-scripts-wordpress

This support ticket is created Il y a 6 années et 8 mois. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Ce sujet contient 16 réponses, a 2 voix.

Dernière mise à jour par amarinos Il y a 6 années et 8 mois.

Assisté par: Shane.

Auteur
Publications
#666897

Hello Shane,

sorry for my late response, but know I found the problem what caused the errors we are talking about ... See here: lien caché ... It was as often a cache plugin problem ... Now the errors are gone 😉 ...

Have a nice Sunday,
Best wishes,
am.

#673737

Problem resolved,
thanks again,

Best wishes,
am.