WordPress.org

Forums

Problem to add multiple user submenus (4 posts)

  1. bedo02
    Member
    Posted 6 years ago #

  2. bedo02
    Member
    Posted 6 years ago #

    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)

  3. bedo02
    Member
    Posted 6 years ago #

    Please help, anyone any idea?

  4. bedo02
    Member
    Posted 6 years ago #

    Please Help, anyone any idea?

Topic Closed

This topic has been closed to new replies.

About this Topic