[resolved] How do I replace the 'Add New User' admin page? (4 posts)

  1. sontru
    Posted 3 years ago #

    I would like to replace the 'Add New User' admin page (user-new.php) with my own custom add new user page using a plugin. Any idea how I would do this?

    I am able to remove the 'Users' menu using:

    add_action( 'admin_menu', 'my_remove_menu_pages' );
    function my_remove_menu_pages() {

    but I don't want to re-write all the sub menus and user functions along with it! I could do this and create my own users menu:

    function my_users () {
            add_menu_page('My Users','My Users','Administrator',__FILE__,'my_users_function');

    and add these functions back in, but how? Any help would be appreciated.

  2. Md Mahmudur Rahman
    Posted 3 years ago #

    You can do this by using the Admin Menu Editor plugin. This plugin will allow you to hide/show any menu or menu item. Also you can create a custom menus that point to any part of the Dashboard or an external URL.

    Here is the link:



  3. sontru
    Posted 3 years ago #

    Thanks guys,

    I've solved it with the following

    add_action( 'admin_menu', 'adjust_the_wp_menu');
    function adjust_the_wp_menu() {
      $page = remove_submenu_page( 'users.php', 'user-new.php' );
      add_users_page('My Users', 'Add New', 'administrator', __FILE__, 'my_user_page');
    function my_user_page(){
            echo "HELLO";

    (I don't know why my page appears as the bottom in the submenu list - is there a way of ordering the submenu items? I want my page menu item to be in the same position, 2, as the original Add New item.)

    I will check out the Admin Menu Editor plugin if I get unstuck again.

Topic Closed

This topic has been closed to new replies.

About this Topic