Skip to main content
added 294 characters in body
Source Link
Milo
  • 78.8k
  • 4
  • 127
  • 168

If the plugins are correctly adding their styles via wp_enqueue_style, you simply need to dequeue them:

function wpa_dequeue_style() {
    wp_dequeue_style( 'plugin-style-handle' );
}
add_action( 'wp_enqueue_scripts', 'wpa_dequeue_style', 100 );

Whether or not this works depends on how and where the plugins are adding their styles, so there's no absolute answer without knowing specific methods the plugins in question use.

EDIT- another option that doesn't involve removing the styles entirely is to enqueue your own styles with the plugin styles as a dependency:

wp_enqueue_style(
    'my-styles',
    get_template_directory_uri() . '/mystyles.css',
    array('plugin-style-handle')
);

If the plugins are correctly adding their styles via wp_enqueue_style, you simply need to dequeue them:

function wpa_dequeue_style() {
    wp_dequeue_style( 'plugin-style-handle' );
}
add_action( 'wp_enqueue_scripts', 'wpa_dequeue_style', 100 );

Whether or not this works depends on how and where the plugins are adding their styles, so there's no absolute answer without knowing specific methods the plugins in question use.

If the plugins are correctly adding their styles via wp_enqueue_style, you simply need to dequeue them:

function wpa_dequeue_style() {
    wp_dequeue_style( 'plugin-style-handle' );
}
add_action( 'wp_enqueue_scripts', 'wpa_dequeue_style', 100 );

Whether or not this works depends on how and where the plugins are adding their styles, so there's no absolute answer without knowing specific methods the plugins in question use.

EDIT- another option that doesn't involve removing the styles entirely is to enqueue your own styles with the plugin styles as a dependency:

wp_enqueue_style(
    'my-styles',
    get_template_directory_uri() . '/mystyles.css',
    array('plugin-style-handle')
);
Source Link
Milo
  • 78.8k
  • 4
  • 127
  • 168

If the plugins are correctly adding their styles via wp_enqueue_style, you simply need to dequeue them:

function wpa_dequeue_style() {
    wp_dequeue_style( 'plugin-style-handle' );
}
add_action( 'wp_enqueue_scripts', 'wpa_dequeue_style', 100 );

Whether or not this works depends on how and where the plugins are adding their styles, so there's no absolute answer without knowing specific methods the plugins in question use.