Sorting Users page admin column with ACF field

You can use the “pre_user_query” filter hook to modify the query that retrieves the users. Here’s an example code that how to sort the Users page admin column with an ACF field named. function sort_users_by_acf_field( $query ) { if ( ! is_admin() ) { return; } if ( isset( $query->query_vars[‘orderby’] ) && ‘user_company_name’ === $query->query_vars[‘orderby’] … Read more

Last Logged In Sortable Column

The default Last Login column only applies to users who are currently logged in. The timestamp is deleted when the user logs out. First, you need to save the timestamp when a user logs in. This will save it to user_meta. function save_login_timestamp( $user_login, $user ) { update_user_meta( $user->ID, ‘last_login’, time() ); } add_action( ‘wp_login’, … Read more

How to get blocks with same heigh in columns?

Finally, I found a solution with flex attributes: I defined the following CSS rules : .flexColumn { display: flex; flex-direction: column; align-self: auto !important; } .flexItem { flex-grow: 1 !important; } I can now apply flexColumn to the columns and flexItem to the items that I want to grow to fill the empty space: For … Read more