How to customize MainWP Dashboard logo

Available with the following:
MainWP Core
Table of Contents

MainWP Dashboard logo can be customized by adding PHP code snippets into the free Custom Dashboard extension.

More information about the hooks can be found on our MainWP Developer Resources​ website: mainwp_menu_logo_href, mainwp_menu_logo_src, and mainwp_menu_logo_alt.

Change the MainWP Dashboard logo

  1. Install the Custom Dashboard extension
  2. Upload a 168x35px image to your WordPress site where MainWP is installed
  3. Add the following snippet to the PHP tab in the Custom Dashboard extension:
    add_filter( 'mainwp_menu_logo_src', 'mainwp_custom_logo' ); 
    function mainwp_custom_logo() { 
    return 'https://149995122.v2.pressablecdn.com/wp-content/uploads/logo.png'; 
    }

  4. Change ‘/wp-content/uploads/logo.png’ to the actual location of your image
    NOTE: Please make sure the relative path is correctly specified. To test if the filter is working on your Dashboard, you can temporarily use a full path, such as `https://your-dashboard.com/wp-content/uploads/logo.png’
  5. Click the Save Changes button

Change the URL of the Logo

  1. Install the Custom Dashboard extension
  2. Add the following snippet to the PHP tab in the Custom Dashboard extension:
    add_filter( 'mainwp_menu_logo_href', 'change_logo_url' ); 
    function change_logo_url() { 
    return 'admin.php?page=managesites'; 
    }
    

  3. Change ‘admin.php?page=managesites’ to your new desired URL
  4. Click the Save Changes button

Change the Alt text of the Logo

  1. Install the Custom Dashboard extension
  2. Add the following snippet to the PHP tab in the Custom Dashboard extension:
    add_filter( 'mainwp_menu_logo_alt','change_logo_alt_text' ); 
    function change_logo_alt_text() { 
    return 'New alt text'; 
    }
    

  3. Change ‘New alt text’ to your new desired Alt text
  4. Click the Save Changes button
Still Have Questions?
Search for additional solutions in the MainWP Community or start your own discussion
MainWP Community

Table of Contents

Search MainWP.com

[searchwp_form id="1"]