Can I easily override plugin's templates and stylesheets in my child theme or does the plugin have to provide functionalities to do this?
I have overridden template files for some of the plugins in the past but some of them don't seem to work.
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.Sign up to join this community
So long as a plugin / theme doesn't use the dreaded !important rule in their CSS files, you should be quite alright to include your own CSS, and over-ride their settings. However some very badly written plugins / themes do use the !important rule, which unfortunately makes it difficult or even impossible to over-ride their styling.
In situations like this, it's best to find what priority level and name they register their style sheet under, and unhook it via wp_dequeue_style( $handle );. It works the same as registering a stylesheet. In situations that require this, what I do is just de-queue their style sheet, copy it completely, and then make the changes I need accordingly. This is the most upgrade-friendly method of doing it, as it does not require you to modify their files directly.
Write a function which uses
wp_enqueue_style() to enqueue your stylesheet. Then hook your function to
add_action(), making sure to use a priority (third argument) that is higher than the priority used by the plugin to enqueue its stylesheet.