Hello sermalefico,
you can do this with wp_deregister_style in your functions.php:
add_action( 'wpcf7_enqueue_styles', 'wpcf7_change_stylesheet', 20 );
function wpcf7_change_stylesheet(){
wp_deregister_style( 'wpcf7-select2' );
wp_deregister_style( 'wpcf7-post-image-checkbox' );
wp_register_style( 'wpcf7-select2', plugin_dir_url(WPCF7_POST_FIELDS_PLUGIN).'assets/css/wpcf7-post-image-checkbox.css' );
wp_register_style( 'wpcf7-post-image-checkbox', plugin_dir_url(WPCF7_POST_FIELDS_PLUGIN).'assets/select2/select2.css' );
}
Works with the new plugin version.
Best regads
Markus
mnmnmn i understand i only want remove the dashicons in frontend because is 50k not the entire style of select
i deregister dashicons and register and enqueue the post fields but when dashicons is deregister post fields css dont apply. Select fields lose all css but the CSS styles are load
add_action( ‘wpcf7_enqueue_styles’, ‘wpcf7_change_stylesheet’, 100 );
function wpcf7_change_stylesheet() {
if ( ! is_user_logged_in() ) {
wp_dequeue_style( ‘dashicons’ );
wp_deregister_style( ‘dashicons’ );
wp_register_style( ‘wpcf7-select2′, plugin_dir_url(WPCF7_POST_FIELDS_PLUGIN).’assets/css/wpcf7-post-image-checkbox.css’ );
wp_register_style( ‘wpcf7-post-image-checkbox’, plugin_dir_url(WPCF7_POST_FIELDS_PLUGIN).’assets/select2/select2.css’ );
}
}
-
This reply was modified 5 years, 8 months ago by
sermalefico.
-
This reply was modified 5 years, 8 months ago by
sermalefico.
-
This reply was modified 5 years, 8 months ago by
sermalefico.
You can also try the plugin Assets Cleaner.
Best regards