For wordpress, account management is relatively low. The background provides a few things: name, gender, and contact information. A personal description can be added at most. Then the other content will be handed over to the WP coders. This function is used by subscribers, authors, and administrators. So in the example of multiple users, if you have to use wordpress, you may have to work hard.
How to customize account contact information
Solagirl has a good article here. You can view it: add new contact information for user information.
The main content is to add new contact methods and remove the built-in ones (AIM, Yahoo IM and Jabber/Google Talk. The main code is as follows:
Add_filter ('User _ contactmethods ', 'My _ user_contactmethods ');
Function my_user_contactmethods ($ user_contactmethods ){
$ User_contactmethods ['QQ'] = 'QQ ';
$ User_contactmethods ['MSN '] = 'MSN ';
Unset ($ user_contactmethods ['aim']);
Unset ($ user_contactmethods ['yim ']);
Unset ($ user_contactmethods ['jabber ']);
Return $ user_contactmethods;
}
Put the above code in function. php. If you want to add other entries, you can write $ user_contactmethods ['keyword'] = 'background display name' in the format and add them in sequence.
The actual result is shown in the figure below.
If you want to call this content elsewhere, you can write
<? Php
$ Current_author = get_userdata (get_query_var ('author '));
Echo $ current_author-> QQ;?>
How to add uneditable content to an account
I thought of two ways: 1. disabled the input box (but it can still be edited after the code is edited); 2. Added the content, which is visible to the administrator.
First, you can use js to handle it, or adjust the input box and add the disabled attribute. The second one is written like this (the basic framework and format are the same as above ):
If (! Isset ($ contactmethods ['Twitter ']) & current_user_can ('create _ users '))
$ Contactmethods ['Twitter '] = 'Twitter ';
If you have the permission to create a new account (administrator), you can edit the hidden entries. The display effect is as follows:
User Perspective
Administrator perspective