Support » Plugins » Creating an admin menu

  • I’m trying to create a simple admin menu for a plugin, which has two text inputs to be stored in the database. Can anybody help me with this, as I can’t figure it out.

    I have the following to create the actual menu and a page:

    // Hook for adding admin menus
    add_action('admin_menu', 'mt_add_pages');
    // action function for above hook
    function mt_add_pages() {
    // Add a new submenu under Settings:
        add_options_page(__('Test Settings','menu-test'), __('Test Settings','menu-test'), 'manage_options', 'testsettings', 'mt_settings_page');
    } // Add this closing bracket
    // mt_settings_page() displays the page content for the Test settings submenu
    function mt_settings_page() {
        echo "<h2>" . __( 'Test Settings', 'menu-test' ) . "</h2>";

    My question is, how to create the info on the page, along with the two text inputs?


  • The topic ‘Creating an admin menu’ is closed to new replies.