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’sfunctions.php
. I guess it’s because the plugin doesn’t check my theme’sfunctions.php
when displaying 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?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Enqueue CSS to a third-party plugin template’ is closed to new replies.