How can we help?

Table of Contents

Customize MainWP Dashboard logo

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 '/wp-content/uploads/logo.png'; 
    }

    Customize MainWP Dashboard logo 1

  4. Change ‘/wp-content/uploads/logo.png’ to the actual location of your image
  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'; 
    }
    

    Customize MainWP Dashboard logo 2

  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'; 
    }
    

    Customize MainWP Dashboard logo 3

  3. Change ‘New alt text’ to your new desired Alt text
  4. Click the Save Changes button

 

 

Still Have a Questions?
Search for additional solutions in the MainWP Community or start your own discussion