wp_enqueue_style specifics for overwriting plugin styles

I’m trying to add some custom CSS to dictate a very small part of a plugin’s look. I don’t want to dequeue the whole think (I don’t think) as I’m happy with the rest of it.

I found this answer here which would appear to be exactly what I need: https://wordpress.stackexchange.com/a/101038/118037

However I’m new to WP and I have not even the faintest idea of where I would put that second lot of code.

wp_enqueue_style(
    'my-styles',
    get_template_directory_uri() . '/mystyles.css',
    array('plugin-style-handle')
);

Can anyone point me in the right direction?

1 Answer
1

Put this code in your current active theme function.php file.

function wpdocs_theme_name_scripts() {
    wp_enqueue_style('my-styles',get_template_directory_uri() . '/mystyles.css',array('plugin-style-handle'));
    }
add_action( 'wp_enqueue_scripts', 'wpdocs_theme_name_scripts' );

Leave a Comment