"client" is a custom post type because I have to add several metaboxes. For a better ergonomy on admin side, I would like to add my custom post type "client" as "users" submenu.

I understand to display a custom post type, normally urls are :

  1. https://my-site.com/wp-admin/edit.php?post_type=client
  2. https://my-site.com/wp-admin/post-new.php?post_type=client

When I add "client" inside users menu, I got this url :


So, that does not work.

How can I get the client edition with list/post-new/edit-new based on the last url ?

1 Answer 1


Solution 1 (not a good idea):

   _x( $this->page_title, "page_title", $this->text_domain ),
   _x( $this->menu_title, "menu_title", $this->text_domain ),

Notice : This code is used in a class.

When you are on the page, it can have some bugs with the menu, it´s a good idea for specific page

Solution 2 :

      'show_in_menu' => "users.php"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.