I’m building a WordPress website for a local business and I want to add a custom field to the user profile page for clients to input their physical address. But, I don’t want this field to be publicly visible on the user’s profile page. Is there a way to create a custom field that is only visible in the WordPress admin dashboard and not on the frontend of the site? If so, how can I do it?
i)code it yourself (for developers)
ii) Use a plugin (for beginners).
In the first option, you add the field with code and hide it on the public profile page using functions like add_action. Alternatively, if that looks complicated for you, I suggest that you use a plugin instead.
They are easy to find and install from the WordPress plugins directory or through your WordPress dashboard. Plugins such as Advanced Custom Fields or User Meta Manager will help you create this field by following some clicks.
Both methods keep client addresses secure in the admin area, hidden from public view.
It’s quite straightforward to add a custom field to the user profile page in the WordPress admin dashboard. However, I’m curious as to why you think this would affect the frontend. By default, WordPress does not display user profile fields on the public-facing site. Could you provide more details on what you are trying to achieve and any specific concerns you have regarding frontend visibility?
Here is a somewhat niave implementation for you to try.
Add the following to your functions.php file.