How To Replace WordPress’ Dashboard Logo
Normally you see WordPress logo in the top left corner of your dashboard,
![]()
If for branding purpose, you want to replace that logo with your own logo, then here’s how to do that-
1. Prepare your logo for the dashboard. Make sure that your logo has width equal to 30px and height equal to 31px. Also try to match its look and feel with the dashboard colors so that it doesn’t look out of the sync.
2. Upload your logo on the web and note down its location.
3. Now open your functions.php file and add this code in it,
function agentwp_dashboard_logo() {
echo '
<style type="text/css">
#header-logo { background-image: url(your_logo_path_here) !important; }
</style>
';
}
Replace your_logo_path_here with the location of your logo image on web.
For instance, if you uploaded the logo in your theme directory, the above code will look like,
function agentwp_dashboard_logo() {
echo '
<style type="text/css">
#header-logo { background-image: url('.get_bloginfo('template_directory').'/images/agentwp-logo.gif) !important; }
</style>
';
}
That’s it. Now you should see your custom logo in dashboard.
