Skip to main content
The 2024 Developer Survey results are live! See the results
10 votes

Remove Personal Options section from Profile

Accepted answer is not working with 4.8 Here comes an up to date and simplified code that should work with any version: // removes admin color scheme options remove_action( '...
RafaSashi's user avatar
  • 487
8 votes

How to remove Biography from user profile admin page

The simplest and most lightweight solution is to use CSS to just hide it from view. .user-description-wrap { display: none; }
Phill Healey's user avatar
7 votes

Replace Gravatar with uploaded images?

Presuming that the user has their avatar saved, as the ID of an attachment, store in user meta, as the field field_with_custom_avatar_id, you could do this to show that attachment if the value is ...
JPollock's user avatar
  • 1,258
7 votes

Removing "Website" Field from the contact info

I resolved the problem with ob_ functions and DOMDocument. It's better than jQuery or CSS for protecting the form. I use this kind of solution every time when I can't access a part of HTML content ...
Jérome Obbiet's user avatar
7 votes
Accepted

How to add first name & last name to default registration form?

Add this code in functions.php add_action( 'register_form', 'myplugin_register_form' ); function myplugin_register_form() { $first_name = ( ! empty( $_POST['first_name'] ) ) ? trim( $_POST['...
Faysal Mahamud's user avatar
6 votes

How to create a edit profile page for users?

This is a pretty big thing to ask but basically you go: Add extra user fields using the code from this answer: Extra User Fields Change them with a custom template for the user: /* Get user info. */ ...
Interactive's user avatar
5 votes

How to add a checkbox to registration and user profile?

The extended answer... // Add the checkbox to registration form add_action( 'register_form', 'foo_add_privacy_policy_field' ); function foo_add_privacy_policy_field() { ?> <p> <...
Sasha Grievus's user avatar
4 votes

Remove Personal Options section from Profile

Thanks to the comment from @Per I got it working for 4.5.2 // removes admin color scheme options remove_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' ); if ( ! ...
Jason Vasilev's user avatar
4 votes

How to remove these fields from the 'Profile' section?

As there seems to be no good php hook for this I ended up hiding the fields with CSS then remove them with JS. add_action( 'admin_head', 'remove_default_profile_fields' ); function ...
tobbe's user avatar
  • 41
4 votes
Accepted

How to make first_name and last_name required fields in user profile?

You could check the $_POST variable when updating the user profile page. I would hook into user_profile_update_errors and do something along those lines. This filter will not save to DB if errors are ...
bynicolas's user avatar
  • 2,279
4 votes

How can I access profile Admin Colour Scheme

The current active/selected admin color scheme is a user setting, you can get its value with get_user_option( 'admin_color' ). $admin_color = get_user_option( 'admin_color' ); if you want to access ...
Aamer Shahzad's user avatar
4 votes
Accepted

Adding HTML/Text to Top of Subscriber's Profile Backend Page

Add this code to your functions.php to add a notice for users with the subscriber role on their profile and dashboard admin pages. function wpse239290_user_welcome_notice() { // Make sure that ...
Dave Romsey's user avatar
  • 17.8k
4 votes
Accepted

How to position user meta data field

WordPress doesn't support such field placement in user profile. If you absolutely need to have your meta field after Nickname, you can use javascript to move form field from one place to another. Look ...
Vitauts Stočka's user avatar
4 votes
Accepted

'profile_update' hook alternative for WooCommerce user meta data

I got it working. The key was the woocommerce_update_customer action. In the end my function was triggered only by these two actions: add_action('user_register','get_all_user_data', 99); add_action('...
Kristián Filo's user avatar
4 votes
Accepted

How to Remove or Deactivate "Application Passwords" in WordPress

Yes, it's wp_is_application_passwords_available to globally disable them: add_filter( 'wp_is_application_passwords_available', '__return_false' ); or wp_is_application_passwords_available_for_user to ...
Rup's user avatar
  • 4,287
3 votes
Accepted

displaying custom code on a given users profile page

Assuming you are in the back-end (admin), so the user profile page is being rendered by /wp-admin/user-edit.php - there is a global variable that indicates the id of the user whose profile we are on. ...
C C's user avatar
  • 1,948
3 votes

Get attachment ID of author_meta image - Attachment Metadata

I suggest you to use the more newer media manager dialog; WordPress will hanlde all the image upload stuff, including generating intermediate sizes and attachement metadata. Here a working example (...
cybmeta's user avatar
  • 20.6k
3 votes

How to use tinyMCE for user "biographical info"?

We should add js lib and init editor for id="description" function mysite_show_extra_profile_fields($user) { wp_enqueue_editor(); ?> <script> document....
Alexufo's user avatar
  • 171
3 votes
Accepted

How to add local users to wordpress without email password?

I had same issue a month ago. As you I tried to use Co-Author Plus, but with the Plugin I haven't reached my goal. So , at the end, I thought that they are not real user and I make them like a custom ...
Monica Maria Crapanzano's user avatar
3 votes
Accepted

How to add a checkbox to registration and user profile?

To add fields on user profile page,there are some filters for displaying them and some filters for saving them and another action for updating personal options.
idpokute's user avatar
  • 377
3 votes
Accepted

Author profile visitors in last 7 days in front end without plugins

The first thing you need to approach is a counter. You said "author profile" so I assume that you are talking about WP's author page, which is an archive template identified by is_author(). And I ...
butlerblog's user avatar
  • 5,021
3 votes
Accepted

how to show all type of author posts in author page (SOLVED)

If you use WordPress author template to show user posts ( example.com/author/{user_name} ) the best solution will be to change the main query via the pre_get_posts filter hook. function ...
nmr's user avatar
  • 4,511
2 votes

How to remove Biography from user profile admin page

Building on the previous answers, here is what I'm using to remove the parts of the User page I don't want: $pagesToAffect = [ '/wp-admin/user-edit.php', '/wp-admin/profile.php' ]; if (isset(...
jxmallett's user avatar
  • 121
2 votes

Extra User Profile Field Upload File / Image

PHP CODE /* * Load style & scripts */ function itclanbd_admin_load_scripts( $hook ) { $allowed = ['profile.php', 'user-new.php', 'user-edit.php']; if ( ! in_array( $hook, $allowed ) ) { ...
Razon Komar Pal's user avatar
2 votes
Accepted

Get attachment ID of author_meta image - Attachment Metadata

I've finally solved! The problem was that simply using update_user_meta( $user_id, 'mycoverimage', $_POST[ 'mycoverimage' ] ); The image was saved without generating attachment metadata. In fact, ...
middlelady's user avatar
2 votes

Change avatar on themed profile page

I also use Simple Local Avatars with Theme my login . I have had the same problem. My solution is very simple .Check form in profile-form.php template directory. And add enctype attribute to form (...
user114542's user avatar
2 votes

Get a list of all available fields in the User Profile

The second parameter in get_user_meta is optional, so you can retrieve all user meta like this (code tested quickly in my install): $cu = get_current_user_id (); $um = get_user_meta ($cu); var_dump ($...
cjbj's user avatar
  • 14.8k
2 votes
Accepted

How to detect when a user changes their name?

The hook you're looking for is insert_user_meta. add_filter( 'insert_user_meta', function( $meta, $user, $update ) { if( true !== $update ) return $meta; $old_meta = get_user_meta( $user->ID );...
Nathan Johnson's user avatar
2 votes

BuddyPress User Profile Menu

I solved it with my own effort. function bp_remove_nav_item() { global $bp; $current_user = wp_get_current_user(); $role_name = $current_user->roles[0]; if($role_name==='...
083N's user avatar
  • 31
2 votes
Accepted

Get WordPress author link by ID

Not a solution this one, but you maybe be able to use it. If you add ?author=X (x = id), the URL fetches the Author profile based on the ID. Example: https://example.com/?author=152
Kim Vinberg's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible