<input type="text" name="facility" id="facility" value="<?php echo esc_attr(
get_the_author_meta( 'facility', $user->ID ) ); ?>"
<?php if (!is_admin()) { echo 'disabled="disabled"'; }
class="regular-text" /><br />
<span class="description"><?php _e("Please enter the facility name."); ?></span>
Add this third line to all your inputs that you don’t want the non-admins to edit.
Related Posts:
- Make display name unique
- How to create a public profile for authors/contributors/users?
- Force users to complete their profile after they register? How to
- Upload gravatar in WP profile?
- add ‘file upload’ field to user details
- Completely hide user info
- Drop down list in user profile page
- Custom style on profile options page
- Add custom fields to the user profile
- Cannot set user passwords
- Is there any function available to echo current user’s profile url?
- How to add local users to wordpress without email password?
- Disable user profile editing for one user
- how to make a profile entry read only except for site managers [closed]
- Forcing WordPress to work differently
- Remove user profile field [duplicate]
- How to add a user profile page to frontend?
- Editable registration date field in user profile
- Profile page for user roles
- User profile updates password even if not filled (Theme my login) in Firefox? [closed]
- How to Create a User Profile Page?
- Prevent subscribers to changing certain profile fields
- Creating User Profiles using author.php
- Create a “user log”
- How to display text if profile fields are not filled?
- What is correct way to change user’s email?
- How to hide user profile fields based on the role of the viewed user?
- How to make current user’s avatar + display name link to their profile?
- Give users alternative/second avatar that is rectangle sized
- User can manage one page accessible by everyone?
- redirect user to their profile after log in
- How to display all user profile info in myaccount page wordpress
- How to add extra field in profile page and show in myaccount?
- WordPress 5.8 – Hide or Remove personal fields from admin Profile page
- How do I update user email from frontend input field?
- How to display extra fields for user
- I need a link that directs the user that is logged to his profile
- How can i display pagination in custom comment list?
- How can i add user display name drop down menu in frontend?
- How to create page for user?
- How to make custom user profile page public?
- update custom field user profile from front end form
- Require confirmation of current user’s email before updating database and before send_email_change_email
- Showing extra profile fields in admin – problem with underscore
- Restrict Access to the User Profile
- Add an ‘edit profile’ page with Genesis
- Manage user profiles with WordPress
- Separate Profiles for Users
- Fetching posts that match a User Profile setting
- How to create a link to a user’s profile page
- Validate user meta and redirect
- Designing a member area on my site
- Storing additional information about the user
- Modify Profile Biographical Info Field
- How to create front-end (editable) WordPress user profile pages?
- Disable editing profile for second time
- What techniques can a user employ to achieve a password rated “strong” in the WordPress password checker
- Cant edit profile from frontend
- Can we get user profile page using user_id in the URL?
- User-edit role setting distinct from wp_capabilities? [closed]
- Hide Admin Menu for Specific User ID who has administrator Role
- Problem with Hebrew characters in username
- Display edit link if post author is current user
- Do not allow users to create new posts and pages
- Send activation email to user after signup [duplicate]
- ACF Upload Image in front-end with custom form
- Admins can’t edit each other’s posts
- Update user_login to change username
- Multiple authors with different “author roles”
- Exclude subscriber users from user list
- How can I check if a user’s email exists in the database
- Getting users by specific capability, not role
- Exclude admin from user list
- Display custom fields in frontside user profile
- Remove Capabilities from WP admin for specific user role
- What is proper way to store info such as user marking a post as favorite? In post meta or user meta?
- What are some best practices for user exit strategy?
- Calling User Nickname
- How redirect after registration?
- Print profile details as PDF or from modal window
- create new users in db starting at what ID?
- Load user by specific role
- Force users to use password with specifications
- New User Save Filter
- Inserting current user ID into Post for Author
- Difference between is_user_logged_in and $_session[‘uname’]
- wp_generate_password sets password but can’t login using created password
- How can admins to be notified of changes when users change their WP profiles?
- Can you Recover a WordPress User from a Backup
- wp-admin/users.php Add a column with last name
- 502 Error when edit some users
- get_users – Sort by a different meta_value than search criteria
- How to prevent deleteting specific user?
- To save user info on the same page by form submiting
- Groups roles & capabilities
- Button for users to upgrade their user role + Button to show current user role!
- Restrict access to certain dashboard pages based on user id
- how to show logged in members username in wordpress content
- User agent stylesheet distorting site [closed]
- application password is missing