Navigation überspringen

[Gelöst] Avoiding CSS import in terms of speed

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

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 vor 6 Jahren, 8 Monaten. 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)

Dieses Thema enthält 16 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von amarinos vor 6 Jahren, 8 Monaten.

Assistiert von: Shane.

Author
Artikel
#666897

Hello Shane,

sorry for my late response, but know I found the problem what caused the errors we are talking about ... See here: versteckter Link ... 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.