Add a custom menu to the WordPress dashboard

This code snippet allows you to add a custom menu to the dashboard in WordPress.

PHP

function custom_admin_menu() {
   add_menu_page( 'Custom Menu Title', 'Custom Menu', 'manage_options', 'custom-menu', 'custom_menu_function', 'dashicons-admin-generic', 6  );
}
add_action( 'admin_menu', 'custom_admin_menu' );

function custom_menu_function() {
  // e.g. put a few links to your frequently accessed pages here
}

Snippet Feedback

Did this snippet work for you? Do you have any questions about this snippet? Leave some feedback below.

Tags

Language

Did it work?

Save Snippet

Embed Snippet

To embed this snippet on your site, copy this html code and paste into your webpage. Learn more
By embedding snippets on your site, you are agreeing to our terms and conditions.

Embed Snippet

To embed this snippet on your site, copy this html code and paste into your webpage. Learn more
By embedding snippets on your site, you are agreeing to our terms and conditions.

Embed Snippet

To embed this snippet on your site, copy this html code and paste into your webpage. Learn more
By embedding snippets on your site, you are agreeing to our terms and conditions.