You have to add following code after your code to get the dates sorting correctly. It’s working correctly for me. Hope it will help.
function change_user_order( $args ){
if( isset( $args['orderby'] ) ) {
$args['meta_key'] = $args['orderby'];
}
return $args;
}
add_filter( 'users_list_table_query_args', 'change_user_order' );
Related Posts:
- Add filter menu to admin list of posts (of custom type) to filter posts by custom field values
- Using meta query (‘meta_query’) with a search query (‘s’)
- Remove Dimension from wp_get_attachment_image
- Add metabox to document tab in gutenberg
- Using get_posts with arguments found in meta keys
- Advanced Custom Fields Validation
- When using add_post_meta and update_post_meta, is there any way to give the individual arrays keys?
- Storing meta fields multiple times OR once with multi dimensional array?
- Custom user avatar in the WordPress users listing
- query_posts and only show results if a custom field is not empty
- User Profile / Add Custom Fields
- Convert jQuery Datepicker Format to SQL Date Format
- Only show metabox when date-value in other metabox is over?
- Is it possible to store arrays in a custom field?
- Assign/update the custom field value for all posts
- HTML / Javascript in custom field textarea?
- Custom Fields Bulk Edit
- Custom Page Template [closed]
- Display newest post’s custom field content on homepage, daily
- Using OR in WP_Query negates the “NOT EXISTS” compare
- Saving an array in a single custom field
- Order posts according to user defined order for meta values?
- Loading scripts to the Post Edit page only
- Registration and Profile custom field
- Per site configuration
- Alternative to simple fields plugin?
- Calling custom fields for pages (not posts)
- Add More Fields to Users Pages (Admin Panel)
- how can i use custom field in query post
- Dynamically fill a post custom field with post publish date
- Create new post with meta data using WordPress API
- get_terms that have custom sticky field checked
- Users Select inside custom metabox
- filtering custom post types via meta data drop down
- WPML & CFT: keeping custom field file to translation
- How to make condition, based on custom fields value?
- Speed up / Optimize Admin Edit Post Page on Large Websites (50-150k posts, 50 custom fields per post)
- Add & store extra fields – WordPress Comments
- Why is my Custom Meta Box Field Inputs NOT saving?
- Filter multiple custom fields Values with Check boxes
- Get registered custom fields or post meta even if empty
- Pass current post title to a predefined link
- Outputing a metabox textarea and avoid line breaks inside li tags
- Restrict WordPress Search to Custom Field
- How to add a custom field to a post created programmatically?
- How to mass update custom fields for more than 20k posts
- remove initial wysiwyg editor from cms page edit
- shortcode in a custom metabox
- How to get posts with a metadata numeric key greater than X?
- List all unique custom field values?
- “Matching” or “Linking” Two WordPress Pages: Custom Fields?
- Build index page from custom fields
- Importing WordPress Posts With Custom Meta Data As CSV Files Through PHPMyAdmin
- How can php be used to return data from custom fields in a post?
- Modify date query by URL parameter using pre_get_posts and $_GET
- Get text from user and display it on page
- Upload & include specific JavaScript files for posts?
- help for user login
- The best way to collision check in WP
- Get meta field value of all catgories
- Displaying a custom field containing a list creates unwanted markup
- How to store meta field values
- Order by custom date field
- Group Posts By Custom Meta Value: Date
- Change Page Order by Custom Field (Magic Fields)
- Custom Field is getting the value of another page/post instead of the current one?
- Custom Field: how to save array of multiple key-values in WordPress
- How can I detect user’s timezone?
- ACF field group not showing in page
- Filter post style attribute
- Update some (not all) post titles with custom field values before running the Loop
- Arrays in custom fields or is there a better way?
- Use value from ACF to populate other fields
- Dynamically populate query source in Elementor post widget
- Sort by an ACF field in a tax_query
- Allow HTML in Custom Metabox area
- Custom field metabox not showing in back-end
- Load one page with parent and child pages
- Why can’t I get the correct post permalink
- Use a different catalog image than the featured image
- Login Api with Meta_key and Meta_value
- Query Multiple meta
- Ordering posts by custom fields
- How to diplay a div only if at least one author custom profile field is filled?
- Set custom field value when reaching expiration date
- Confusion on how to display custom field data
- Order by custom field in query multiple
- Returning website screenshot based on Custom Field
- How to allow user to add to, but not edit, a post?
- Custom Metaboxes, multiple post selection
- How to organise via Custom Fields on Category Page
- Calling Custom Field within Function wrapped with Divs.
- Cannot Hide Google Map if custom field is blank
- Display custom field value into content with hyperlink
- how to add radio field on user meta on function.php?
- Add CSS class to posts with certain meta key
- Best way for managing images of ads banners
- Crop custom image size vs actual size
- Multiple permalinks for a single post from custom field
- Search for meta_query does not return any result if combined with title