Changing and overriding the WordPress Dashboard Logo

In the most recent post Changing and overriding the WordPress Admin logo, I showed how to update the WordPress Admin logo. This was using a particular method that worked, but it turned out I wanted to make the subscriber experience a little more complete.

So this this article, I’ve simplified the WordPress Admin logo code, and in addition to that I’ve also changed the WordPress Dashboard logo, which will be one of two logos or “dashicons” displayed when a subscriber, or anyone else, is logged in.

This is what it looked like before, executing the code from that post:

Changing and Overriding the WordPress Dashboard logo before thedavebraun

You can see in the upper left the new graphic the place of the Admin logo, but you still see the old Dashboard logo.

With the code snippet from below, here is what it will currently look like:

Changing and Overriding the WordPress Dashboard logo after thedavebraun

You’ll notice the same exact graphic used for both the WordPress Dashboard logo and the Admin logo. You can choose something else, or simply replace the dashicon with another dashicon.

Code for changing and overriding of the WordPress Dashboard logo

Here are the steps to get this done:

  1. If you haven’t created a child theme, make sure you have one and do this in the child theme area so your changes don’t get overwritten by a theme update.
  2. Create your logo and upload it into where the child theme is, or preferable into an images directory. Use 25×27 or something close and png or gif with a transparent background.
  3. Add the below code into your functions.php.
  4. Modify it for your logo name and directory.

This version of the code handles both the WordPress Admin logo and the WordPress Dashboard logo.