Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    Try to put the following code in functions.php file of your currently active theme or via Code Snippets plugin and let me know if it helps. Make sure you use the correct key you have from form builder in place of the ‘phone’ in the code:

    add_filter('manage_users_columns', 'add_user_table_column_cb');
    function add_user_table_column_cb( $column ) {
    	$column['uwp_user_phone'] = __('Phone', 'userswp');
    	return $column;
    }
    
    add_filter('manage_users_custom_column', 'add_user_table_row_cb', 10, 3);
    function add_user_table_row_cb( $val, $column_name, $user_id ) {
    	switch ($column_name) {
    		case 'uwp_user_phone' :
    			$val = uwp_get_usermeta($user_id, 'phone', '-');
    			break;
    		default:
    	}
    	return $val;
    }

    Regards,
    Patrik

    Thread Starter Slobodan Miletic

    (@milettic)

    Great job,
    Thank you very much

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Add Phone column to Users admin panel’ is closed to new replies.