do_action( ‘show_user_profile’, WP_User $profile_user )

Fires after the ‘About Yourself’ settings table on the ‘Profile’ editing screen.


The action only fires if the current user is editing their own profile.


The current WP_User object.

More Information

This action hook is typically used to output new fields or data to the bottom of WordPress’s user profile pages.

This hook only triggers when a user is viewing their own profile page. If you want to apply your hook to ALL profile pages (not just the current user) then you also need to use the edit_user_profile hook.


do_action( 'show_user_profile', $profile_user );



User Contributed Notes

  1. Skip to note 4 content

    Example migrated from Codex:

     * Show custom user profile fields
     * @param  object $profileuser A WP_User object
     * @return void
    function wpdocs_custom_user_profile_fields( $profileuser ) {
    	<table class="form-table">
    				<label for="user_location"><?php _e( 'Location' ); ?></label>
    				<input type="text" name="user_location" id="user_location" value="<?php echo esc_attr( get_the_author_meta( 'user_location', $profileuser->ID ) ); ?>" class="regular-text" />
    				<br><span class="description"><?php _e( 'Your location.', 'text-domain' ); ?></span>
    add_action( 'show_user_profile', 'wpdocs_custom_user_profile_fields' );
    add_action( 'edit_user_profile', 'wpdocs_custom_user_profile_fields' );

You must log in before being able to contribute a note or feedback.