Creating an admin menu (1 post)

  1. HorrorUK
    Posted 4 years ago #

    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?


Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.