• 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 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?

    • This topic was modified 3 years, 5 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic
Viewing 1 replies (of 1 total)
  • Moderator t-p

    (@t-p)

    custom theme is displayed by a third-party plugin

    If this was a custom theme, you may have to go back to your developer team and ask them to make the necessary change(s) to the theme.

    Or, try asking at the support of the third-party plugin so the plugin’s developers and support community can help you with this.

    Commercial products are not supported in these forums.

Viewing 1 replies (of 1 total)
  • The topic ‘Enqueue CSS to a third-party plugin template’ is closed to new replies.