[resolved] WordPress logo in admin-bar (6 posts)

  1. Laura
    Posted 3 years ago #

    I would like to change the wp-logo.png image in the admin-bar to the logo of the site I am building. I am a newbie, but am familiar with php and have access in cpanel to the folders and files for editing. I have found the function in wp-includes/admin-bar.php,

    function wp_admin_bar_wp_menu( $wp_admin_bar ) {
    $wp_admin_bar->add_menu( array(
    'id' => 'wp-logo',
    'title' => '<span class="ab-icon"></span>',
    'href' => self_admin_url( 'about.php' ),
    'meta' => array(
    'title' => __('About WordPress'),
    ) ); etc, etc.
    And, I know where the logo is located in the images folder, but I can't figure out where the <img> tag is that calls for the logo image so that I can change the image to the company's logo instead of the wp logo. Please help.

  2. Tara
    Volunteer Moderator
    Posted 3 years ago #

    Add custom admin logo:

    function custom_admin_logo() {
        echo '
            <style type="text/css">
                #header-logo { background-image: url('.get_bloginfo('stylesheet_directory').'/images/logo.png) !important; }
    add_action('admin_head', 'custom_admin_logo');

    add it to your theme's functions.php file.

  3. Laura
    Posted 3 years ago #

    Ok, I added the function, but I'm not sure what to do now. Where do I actually change the logo?

  4. Tara
    Volunteer Moderator
    Posted 3 years ago #

    have you uploaded logo.png into your theme's "images" folder?

  5. Drew Jaynes
    Docs Czar
    Posted 3 years ago #

    You can also use the White Label CMS plugin to change that logo and other aspects of the Dashboard: http://wordpress.org/extend/plugins/white-label-cms/

  6. Laura
    Posted 3 years ago #

    Thanks. I've downloaded the white label plugin and try it out. It looks like exactly what I need.

Topic Closed

This topic has been closed to new replies.

About this Topic