Add custom field address_3 before city in user profile


I have a little question, I managed to create a new field in the administration user but I would like to display it between address 2 and the city and I do not see how to do it, can you help me?

In functions.php I put that:

add_action( 'show_user_profile', 'extra_user_profile_fields' );
add_action( 'edit_user_profile', 'extra_user_profile_fields' );

function extra_user_profile_fields( $user ) { ?>

    <table class="form-table">
        <th><label for="address"><?php _e("Address 3"); ?></label></th>
            <input type="text" name="address_3" id="address_3" value="<?php echo esc_attr( get_the_author_meta( 'address_3', $user->ID ) ); ?>" class="regular-text" /><br />
<?php }
, , Velphia 3 years 2020-07-21T11:10:37-05:00 0 Answers 50 views 0

Leave an answer