Enqueue css to a third-party plugin template


The frontend Dashboard page on my website that uses my custom theme is displayed by a third-party plugin. The plugin supports its templates override, so I replaced the plugin’s header template with my template’s header using get_header() function, and the right header is displayed successfully, however it doesn’t enqueue my custom css file that I have in my theme’s functions.php. I guess it’s because the plugin doesn’t check my theme’s functions.php when diplaying the page.

function add_theme_scripts() {
    wp_enqueue_style('theme-style', get_template_directory_uri() . '/assets/css/main.css', false, '1.1', 'all');
add_action('wp_enqueue_scripts', 'add_theme_scripts');

How can I enqueue css with a third-party plugin template?

qwaz 11 months 2021-09-24T10:55:09-05:00 0 Answers 0 views 0

Leave an answer