WordPress.org

Ready to get started?Download WordPress

Forums

wp_admin_css (3 posts)

  1. niccol
    Member
    Posted 3 years ago #

    has anyone got wp_admin_css to work the way it is described in the codex?

    For instance in 'Creating Admin Themes'. There are a lot of posts saying it doesn't work but not many saying that it does. I guess not many people post just to say that it works though....

    I got round the issue by using login_head instead but wp_admin_css would be more elegant.

    Anyone?

  2. niccol
    Member
    Posted 3 years ago #

    OK I found this.

    http://core.trac.wordpress.org/ticket/14559

    That being the case perhaps we all need to change the 'Creating Admin Themes' page. Happy to help with that just don't know how to go about it.

  3. noxion
    Member
    Posted 3 years ago #

    You have to add this code bellow, for example:

    [please read http://codex.wordpress.org/Forum_Welcome#Posting_Code for posting code]

    function my_wp_admin_css() {
     echo '<link rel="stylesheet" type="text/css" href="' .get_bloginfo('template_url').'/wp-admin.css">';
    }
    
    add_action('wp_admin_css','my_wp_admin_css');
    apply_filters( 'wp_admin_css','my_wp_admin_css' );

    Note that I've put the action too. I think that is something broken. So this is the workaround. =)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.