Add menu to WordPress admin panel

By

/**************************************************
 * Add custom menu to dashboard
 **************************************************/
function register_custom_menu_page() {
  add_menu_page( 
      'Manual', // Page Title
      'Manual', // Menu Title 
      'edit_posts',  // https://wordpress.org/support/article/roles-and-capabilities/
      'custom_manual',  // Menu Slug
      'ebz_menu_func',  // page_callback_function
      'dashicons-editor-help', // https://developer.wordpress.org/resource/dashicons/#menu
      null  // position (default null)
     );
}
add_action('admin_menu', 'register_custom_menu_page');

function ebz_menu_func(){
   echo "<h1>Manual</h1>";
// custom content here ... 
}

Leave a Comment