Hide A Particular Admin Account From Wordpress User List

后端 未结 5 731
耶瑟儿~
耶瑟儿~ 2021-01-31 23:34

I\'d like to create an admin user in Wordpress and then hide it from the users list in the wordpress dashboard, as a kind of hidden back door. I am not trying to hide all admins

5条回答
  •  萌比男神i
    2021-02-01 00:10

    I know, an old topic but someone sent me this link today..

    One update: The hook is no longer pre_user_query BUT wp_user_query instead.

    Also, with this method you're hiding your account from this particular admin account alone. Not all. What if another admin is added later on?

    What I'd do is to hide the 'secret' account from anyone, except for themselves (in order to be able to edit it).

提交回复
热议问题