• craigglenn

    (@craigglenn)


    Can someone please help me with my code to load my plugin CSS.

    Abstract: I am writing a plugin and want to apply styles to my admin pages. I have created a css file in my plugin directory and am trying to load it with the code below. The style is not being loaded


    add_action( 'wp_enqueue_scripts', 'nst_admin_styles' );

    function nst_admin_styles() {
    $nstplugindir = plugins_url('nexus-ticker/nst-css.css');
    wp_register_style('nst-css', $nstplugindir, array());
    wp_enqueue_style( 'nst-css');
    }

    Thanks for you help,

    Craig

The topic ‘Having trouble adding my plugin css’ is closed to new replies.