How to do it?
1-Make a folder in wordpress -> wp-content -> plugins
2-Make a php file and put the file inside it.
3-Then go to admin panel and look at the link it would be there.
In our example we will have a folder called admin-menu and php file admin-menu.php.
Code for adim-menu.php
< ?php
/*
Plugin Name: Admin Menu
Plugin URI: http://wp-help.blogspot.com/
Description: Admin Menu
Author: zalmai khan
Author URI: http://wp-help.blogspot.com/
*/
// Hook for adding admin menus
add_action('admin_menu', 'mt_add_pages');
// action function for above hook
function mt_add_pages() {
// Add a new top-level menu (ill-advised):
add_menu_page(__('Your Menu Title'), __('Your Menu name'), 'manage_options', 'mt-top-level-handle', 'mt_toplevel_page' );
}
// mt_toplevel_page() displays the page content for the custom Test Toplevel menu
function mt_toplevel_page() {
echo "
" . __( 'page contents for the menu' ) . "
";}
?>