Skip to content

Instantly share code, notes, and snippets.

@danielbachhuber
Created September 16, 2013 17:49
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save danielbachhuber/6584069 to your computer and use it in GitHub Desktop.
Save danielbachhuber/6584069 to your computer and use it in GitHub Desktop.
Include your logo into the WordPress toolbar You'll likely want to update the path to your logo.
<?php
add_action( 'admin_bar_menu', function( $wp_admin_bar ){
$args = array(
'id' => 'your-logo',
'title' => '<img style="padding-top:5px;" src="' . plugins_url( 'img/your-logo.png', __FILE__ ) . '" />',
);
$wp_admin_bar->add_node( $args );
}, 0 );
add_action( 'admin_bar_menu', function( $wp_admin_bar ){
$wp_admin_bar->remove_node( 'wp-logo' );
}, 100 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment