WordPress.org

Support

Support » Plugins and Hacks » wp_admin_css not working?

wp_admin_css not working?

  • I’ve been trying to get the basic wordpress admin css files into my theme directory by making a plugin. I read the documentation on the functions needed and it states that it is possible to overwrite the function to use your css files, but i cant get it to work.

    im using the following code:
    function my_wp_admin_css() {
    echo ‘<link rel=”stylesheet” href=”‘. get_template_directory_uri() . ‘/admin/wp-admin.css” type=”text/css” />’.”\n”;
    }

    add_action(‘wp_admin_css’, ‘my_wp_admin_css’);

    the plugin itself is working, i added another hook into the login_head and that is working fine.

    when i look in the sourcecode i still see that it is using the css from the admin directory. If i disable it by doing this in the wp-login file:
    wp_admin_css( ‘login’, false );

    it shows no CSS files, any ideas how or why this is happening?

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘wp_admin_css not working?’ is closed to new replies.
Skip to toolbar