Skip to main content
All CollectionsMainWP Customization
How to customize MainWP Dashboard logo
How to customize MainWP Dashboard logo
Updated over 2 weeks ago

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. Upload a 168x35px image to your WordPress site where MainWP is installed

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

  3. 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’

  4. Click the Save Changes button

Change the URL of the Logo

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

  2. Change ‘admin.php?page=managesites’ to your new desired URL

  3. Click the Save Changes button

Change the Alt text of the Logo

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

  2. Change ‘New alt text’ to your new desired Alt text

  3. Click the Save Changes button

Did this answer your question?