Sharing: How to dequeue sharing.css
-
Since it’s quite painful to overwrite sharing styles (see #1500 and #1922) and it’s loading a bunch of CSS I don’t need or want, I’d like to dequeue
sharing.cssfrom my theme.I’m struggling to figure out how. I know there’s a checkbox one can check to disable both the css _and_ the JS, but I’d like to keep the JS. Is there any way to remove _just_ the CSS file?
For reference, here’s what I’ve tried, in various different incarnations and levels of desperation:
`
add_filter( ‘jetpack_sharing_counts’, ‘__return_false’, 99 );
add_filter( ‘jetpack_implode_frontend_css’, ‘__return_false’, 99 );function smittenkitchen_deregister_styles() {
wp_deregister_style( ‘sharing’ );
wp_dequeue_style( ‘sharing’ );
}
add_action( ‘wp_enqueue_scripts’, ‘smittenkitchen_deregister_styles’, -1 );
add_action( ‘wp_print_styles’, ‘smittenkitchen_deregister_styles’, -1 );
`I’m sure there’s a simple way to get rid of it, but I’ve been banging my head against the wall trying to suss out what the magic combination is.
Thanks in advance for your help!
The topic ‘Sharing: How to dequeue sharing.css’ is closed to new replies.