Comments 36Miss Fashion Week started the conversationJune 11, 2020 at 7:37pmHow to change the columns of Users to show number of Products? this is under 'users' 2,636Kevin repliedJune 12, 2020 at 2:50amHi Miss Fashion Week This part is the back-end of the WP displaying related information and it does not yet support displaying number products herethank you 36Miss Fashion Week repliedJune 14, 2020 at 6:00amWill show how many orders that the customer bought? 36Miss Fashion Week repliedJune 14, 2020 at 6:00amHow to sort users from old to new ..right now it's random 2,636Kevin repliedJune 15, 2020 at 2:45amHi Miss Fashion Week "Will show how many orders that the customer bought?"Please try leaving the support question on the Dokan plugin about supporting this not for details# refer to this document for more user arrangementshttps://rudrastyh.com/wordpress/sortable-date-user-registered-column.html thank you 36Miss Fashion Week repliedJune 15, 2020 at 7:13pmwe copied the follow code into theme functions. now the whole website down./* * Create a column. And maybe remove some of the default ones * @param array $columns Array of all user table columns {column ID} => {column Name} */ add_filter( 'manage_users_columns', 'rudr_modify_user_table' ); function rudr_modify_user_table( $columns ) { // unset( $columns['posts'] ); // maybe you would like to remove default columns $columns['registration_date'] = 'Registration date'; // add new return $columns; } /* * Fill our new column with the registration dates of the users * @param string $row_output text/HTML output of a table cell * @param string $column_id_attr column ID * @param int $user user ID (in fact - table row ID) */ add_filter( 'manage_users_custom_column', 'rudr_modify_user_table_row', 10, 3 ); function rudr_modify_user_table_row( $row_output, $column_id_attr, $user ) { $date_format = 'j M, Y H:i'; switch ( $column_id_attr ) { case 'registration_date' : return date( $date_format, strtotime( get_the_author_meta( 'registered', $user ) ) ); break; default: } return $row_output; } /* * Make our "Registration date" column sortable * @param array $columns Array of all user sortable columns {column ID} => {orderby GET-param} */ add_filter( 'manage_users_sortable_columns', 'rudr_make_registered_column_sortable' ); function rudr_make_registered_column_sortable( $columns ) { return wp_parse_args( array( 'registration_date' => 'registered' ), $columns ); } Miss Fashion Week replied privately 36Miss Fashion Week repliedJune 15, 2020 at 7:35pmrecovered and deleted the code. 2,636Kevin repliedJune 16, 2020 at 7:11amHi Miss Fashion WeekI added it in the functions.php fileYou can review it in the Users menuthank you Sign in to reply ...
How to change the columns of Users to show number of Products?
this is under 'users'
Hi Miss Fashion Week
This part is the back-end of the WP displaying related information and it does not yet support displaying number products here
thank you
Will show how many orders that the customer bought?
How to sort users from old to new ..right now it's random
Hi Miss Fashion Week
"Will show how many orders that the customer bought?"
Please try leaving the support question on the Dokan plugin about supporting this not for details
# refer to this document for more user arrangements
https://rudrastyh.com/wordpress/sortable-date-user-registered-column.html
thank you
we copied the follow code into theme functions. now the whole website down.
/*
* Create a column. And maybe remove some of the default ones
* @param array $columns Array of all user table columns {column ID} => {column Name}
*/
add_filter( 'manage_users_columns', 'rudr_modify_user_table' );
function rudr_modify_user_table( $columns ) {
// unset( $columns['posts'] ); // maybe you would like to remove default columns
$columns['registration_date'] = 'Registration date'; // add new
return $columns;
}
/*
* Fill our new column with the registration dates of the users
* @param string $row_output text/HTML output of a table cell
* @param string $column_id_attr column ID
* @param int $user user ID (in fact - table row ID)
*/
add_filter( 'manage_users_custom_column', 'rudr_modify_user_table_row', 10, 3 );
function rudr_modify_user_table_row( $row_output, $column_id_attr, $user ) {
$date_format = 'j M, Y H:i';
switch ( $column_id_attr ) {
case 'registration_date' :
return date( $date_format, strtotime( get_the_author_meta( 'registered', $user ) ) );
break;
default:
}
return $row_output;
}
/*
* Make our "Registration date" column sortable
* @param array $columns Array of all user sortable columns {column ID} => {orderby GET-param}
*/
add_filter( 'manage_users_sortable_columns', 'rudr_make_registered_column_sortable' );
function rudr_make_registered_column_sortable( $columns ) {
return wp_parse_args( array( 'registration_date' => 'registered' ), $columns );
}
recovered and deleted the code.
Hi Miss Fashion Week
I added it in the functions.php file
You can review it in the Users menu
thank you