#Dashicon method
add_action( 'admin_menu', 'register_my_custom_menu_page' ); function register_my_custom_menu_page() { // add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $position ); add_menu_page( 'Custom Menu Page Title', 'Custom Menu Page', 'manage_options', 'custom.php', '', 'dashicons-welcome-widgets-menus', 90 ); }
#Normal Icon Method
/** * Register a custom menu page. */ function wpdocs_register_my_custom_menu_page() { add_menu_page( __( 'Custom Menu Title', 'textdomain' ), 'custom menu', 'manage_options', 'myplugin/myplugin-admin.php', '', plugins_url( 'myplugin/images/icon.png' ), 6 ); } add_action( 'admin_menu', 'wpdocs_register_my_custom_menu_page' );