Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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.