• Hi Folks,
    I hope I will find help here.

    I am trying to create several submenus for the “USER” top level menu at the back office (Admin page).
    I was trying to re-do it following this documentation.

    But only what I am getting is that my submenus a linked together (as it where one menu) and I am getting one page where the subpages are listed one under another, but not separate pages.

    Here is my code :

    ?>
    <?php
    add_action('admin_menu', 'WPEUDE_menu');
    function WPEUDE_menu () {
      add_submenu_page('users.php', 'Your Historical Orders', 'Purchase History', 0, __FILE__, 'WPEUDE_history');
      add_submenu_page('users.php', 'Your Address Details', 'Address Details', 0, __FILE__, 'WPEUDE_usrdet');
    }
    function WPEUDE_history() {
      echo '<div class="wrap">';
      include (ABSPATH.'wp-content/plugins/WP-E-UserDataExt/Puchase_History.php');
      echo '</div>';
    }
    function WPEUDE_usrdet() {
      echo '<div class="wrap">';
      include (ABSPATH.'wp-content/plugins/WP-E-UserDataExt/User_Details.php');
      echo '</div>';
    }
    ?>

    I don′t know where I am making a mistake, because the menu is created and the content is also displayed, but not separated as it should.
    Please help me I don′t know how further. Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter bedo02

    (@bedo02)

    Hi Folks,
    I hope I will find help here.

    I am trying to create several submenus for the “USER” top level menu at the back office (Admin page).
    I was trying to re-do it following this documentation.

    But only what I am getting is that my submenus a linked together (as it were one menu) and I am getting one page where the subpages are listed one under another, but not separate pages.

    Here is my code :

    ?>
    <?php
    add_action('admin_menu', 'WPEUDE_menu');
    function WPEUDE_menu () {
      add_submenu_page('users.php', 'Your Historical Orders', 'Purchase History', 0, __FILE__, 'WPEUDE_history');
      add_submenu_page('users.php', 'Your Address Details', 'Address Details', 0, __FILE__, 'WPEUDE_usrdet');
    }
    function WPEUDE_history() {
      echo '<div class="wrap">';
      include (ABSPATH.'wp-content/plugins/WP-E-UserDataExt/Puchase_History.php');
      echo '</div>';
    }
    function WPEUDE_usrdet() {
      echo '<div class="wrap">';
      include (ABSPATH.'wp-content/plugins/WP-E-UserDataExt/User_Details.php');
      echo '</div>';
    }
    ?>

    I don′t know where I am making a mistake, because the menu is created and the content is also displayed, but not separated as it should be.
    Please help me I don′t know how further. Thank you.

    (I′ve corrected the link, sorry for that)

    Thread Starter bedo02

    (@bedo02)

    Please help, anyone any idea?

    Thread Starter bedo02

    (@bedo02)

    Please Help, anyone any idea?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Problem to add multiple user submenus’ is closed to new replies.