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.
SHARED BY