Plugin Author
donmik
(@atallos)
You can try this: http://tareq.wedevs.com/2011/07/add-your-custom-columns-to-wordpress-admin-panel-tables/
<?php
function test_modify_user_table( $column ) {
$column['name of the column'] = 'display name of the column';
return $column;
}
add_filter( 'manage_users_columns', 'test_modify_user_table' );
function test_modify_user_table_row( $val, $column_name, $user_id ) {
switch ($column_name) {
case 'name of the column' :
return xprofile_get_field_data('name of the field', $user_id);
break;
default:
}
return $return;
}
add_filter( 'manage_users_custom_column', 'test_modify_user_table_row', 10, 3 );
This code must work, you must change the following:
“name of the column” => The name of the column.
“display name of the column” => The name of the column you want to be displayed.
“name of the field” => The name of the xprofile field you want to display the value.
Thread Starter
devpaq
(@devpaq)
I ended up using the plugin http://wordpress.org/plugins/buddypress-profile-view-from-admin/ which has a link to the profile details – but your code would be much more helpful since it will be on the same screen. I will try it out later and let you know how it goes.
Thanks!
@domnik, your code works perfectly, would make it sortable?
Plugin Author
donmik
(@atallos)
Make it sortable will be more complicated, you probably have to use filters to modify query…