Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

WordPress

Natasha McDiarmid
Natasha McDiarmid
11,400 Points

How to Remove WordPress Plugin Styles

I am using a multisite plugin and it comes with a handful of ugly styles and I want to remove the .css styles completely as they aren't dependent on the functionality.

This code isn't working. What am I doing wrong?

wp_deregister_style('nlpcss-css', plugins_url().'/network-latest-posts/css/default_style.css', __FILE__);
wp_dequeue_style('nlpcss-css');

1 Answer

Igor Yamshchykov
Igor Yamshchykov
24,397 Points

I think you shouldn't modify plugin unless it's yours. The best way is to override plugin styles with your custom styles.