By default, you see WordPress logo in the top left corner of your dashboard,
You may want to replace the WordPress logo in dashboard with your own logo for branding reasons. Here’s how you can replace WordPress dashboard logo,
1. Prepare your custom logo for the WordPress 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 WordPress dashboard.