wp_admin_css not working? (5 posts)

  1. Knight Fight
    Posted 6 years ago #

    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?

  2. pampfelimetten
    Posted 6 years ago #

    same problem...

  3. merlinn31
    Posted 5 years ago #


  4. Justin Scheetz
    Posted 5 years ago #

    Same here as well!

  5. peter_p
    Posted 5 years ago #

    I am seeing the same issue. We are writing a custom theme and trying to override the default ie.css. Any help here would be greatly appreciated.

Topic Closed

This topic has been closed to new replies.

About this Topic