Dashboard Logo

Community Forums Forums General Discussion Dashboard Logo

This topic is: not resolved

This topic contains 4 replies, has 2 voices, and was last updated by  manavecplan 1 year, 6 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #15033

    manavecplan
    Participant
    Post count: 21

    Pure vanity but have been trying to brand my dashboard a bit more.

    Picked up the php below from Smashing Magazine but have checked it against a few other sites too. So I know it works…

    My dashboard logo(to replace WordPress) is located here: http://www.cityslick.in/custom/img/dashboard-logo.png but the code never fires.

    A little help?

    [php]

    //ADMIN: Custom dashboard logo
    function new_admin_logo() {
    echo ‘<style type="text/css">#header-logo { background-image: url(‘.get_bloginfo(‘template_directory’).’/images/dashboard-logo.png) !important; }</style>’;
    }
    add_action(‘admin_head’, ‘new_admin_logo’);
    [/php]

    #15124

    anitac
    Participant
    Post count: 7032

    I use this plugin and it customizes much more.

    http://wordpress.org/extend/plugins/erident-custom-login-and-dashboard/


    Let me help you customize your theme, responsive header, Buddypress, Agentpress or technical issue!
    Visit me here: Cre8tiveDiva.com | Tweet Me! | Plus Me!
    When asking for help, please provide a link or screen shot showing your problem!

    #15298

    manavecplan
    Participant
    Post count: 21

    Thanks for replying Anita!

    While you’re absolutely correct in that the plugin you’ve mentioned customizes a lot more, I’m just looking to get the dashboard logo activated.

    The plugin has a ton of other code which I don’t really need…and my rule of thumb is to minimize the plugins I load on any of my sites. :-)

    I think the reason the logo doesn’t display in the dashboard is because of where the png file has been saved…but I can’t pinpoint the ideal location.

    As of now, my customisations are being run from a folder called ‘custom’ in the root.

    #15304

    anitac
    Participant
    Post count: 7032

    I used Firefox Firebug and it’s somewhere in the wp-admin/load-styles.php file. The image is actually a sprite.


    Let me help you customize your theme, responsive header, Buddypress, Agentpress or technical issue!
    Visit me here: Cre8tiveDiva.com | Tweet Me! | Plus Me!
    When asking for help, please provide a link or screen shot showing your problem!

    #15365

    manavecplan
    Participant
    Post count: 21

    Almost have it nailed…the following code works. :-)

    [php]

    //ADMIN: Custom dashboard logo
    function custom_logo() {
    echo ‘
    <style type="text/css">
    #wp-admin-bar-wp-logo > .ab-item .ab-icon {
    background-image: url(http://www.cityslick.in/custom/img/dashboard-logo.png) !important;
    background-position: 0 0;
    }
    #wpadminbar #wp-admin-bar-wp-logo.hover > .ab-item .ab-icon {
    background-position: 0 0;
    }
    </style>
    ‘;
    }
    add_action(‘admin_head’, ‘custom_logo’);

    [/php]

    The only niggle I have left is the size of the logo itself. For some reason, WordPress seems to be expanding my 20px x 20px logo to 30px x 30px. Hopefully, it’s just a cache issue…

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.