Excellent Programming Tricks

WordPress Developer | Menu related topics

Ref: https://developer.wordpress.org/
  1. add_menu_page( string $page_title, string $menu_title, string $capability, string $menu_slug, callable $function =' ', string $icon_url = ' ', int position = ' ' );
    1. add_menu_page( 'My Theme Title', 'Settings', 'manage_options', 'Excellent_Programming', 'excellent_create_page', get_template_directory_uri() . '/img/sunset-icon.png', 110 );
  2. add_submenu_page( string $parent_slug, string $page_title, string $menu_title, string $capability, string $menu_slug, callable $function = '' );
    1. When main menu appear in submenu: use main menu slug '$menu_slug' with submenu slug. Other submenu slug has their identical slug. Parent slug would be same. Also, function should be same name, if same name two function will execute.
    2. add_submenu_page( 'iftekhar-guddi', 'Guddi Settings', 'Guddi Settings', 'manage_options', 'guddi_settings',  'add_submenu_page_function_2');
  3. function main_function() {
    //generation of our admin page
    }
  4. add_action( 'admin_menu', 'main_function');

No comments:

Post a Comment


Authentic аnd Excellent

Website

HTML Template

Wordpress Theme

Database applications

OR

Application services?

Excellent Programming Tricks (EPT) || Iftekhar-IT || We develops the Web applications and the WordPress templates. || Excellent Programming Tricks (EPT)

© 2020 Blogger Theme by Iftekhar IT || Excellent Programming Tricks

Execllent Programming Tricks. Powered by Blogger.