If I’m understanding your question correctly, I think you just want to sort your custom column by author, since by default this will sort by the ID. Untested, but can’t see why it wouldn’t work. The display value of the column shouldn’t matter.
add_action( 'pre_get_posts', 'wpse_orderby_author_column' );
function wpse_orderby_author_column( $query ) {
if( ! is_admin() )
return;
$orderby = $query->get('orderby');
// Change my_custom_column to the name of your column
if( 'my_custom_column' == $orderby ) {
$query->set('orderby','author');
}
}
Related Posts:
- Creating 20,000 Posts or Pages using a .csv file?
- How to properly insert data into custom table via plugin
- How does WordPress handle MySQL row lock errors?
- Searching users with WP_List_Table plugin
- Search and replace text across all posts
- Convert WordPress posts to products in WooCommerce
- Can I explicitly specify ENGINE=InnoDB in WordPress?
- Bad Request (Invalid Hostname) on working server, database problem
- How can I list only sites that use a particular theme or plugin?
- Help!! I Screwed up my WP
- $wpdb->get_results() does not fetch results with unicode ‘WHERE’ clause
- Changing BIGINT to INT
- Can I run multiple queries with $wpdb->prepare?
- How to remove duplicate Custom Fields?
- wordpress in nginx docker container connected to php:8-fpm container and mariadb container isn’t creating any tables on plugin activation
- greatest() function returns undefined property
- How to write one comment and publish on every post using database or plugin?
- How to get number of Affected rows from wordpress dbDelta() function
- How to determine what is generating large amount of database queries?
- Get post by ASC from custome field DATE picker
- MySql database help for a plugin
- How to remove Database Table in WordPress via Function file?
- mysqli_error() expects parameter 1 to be mysqli, null given in own db class
- Bulk edit existing shortcode within custom field
- Display data on Word Press site posts and pages from mysql table
- How to simultaneously access the same MySQL database in the main column and sidebar of WordPress?
- Help With MySQL to WPDB Query Conversion
- get current date + 90 days and checking every day
- join 2 table orders wordpress plugin
- How do I run SQL queries on a WordPress web page? [closed]
- How can I perform high-level database merging for WordPress within continues delivery?
- 306 MB of wp_options occupied by WordPress SEO Plugin, is that normal? [closed]
- WordPress plugin creation how to execute .sql in order to insert multiple rows at activation of plugin
- Plugin: register_deactivation_hook works perfectly well, while register_activation_hook suddenly stopped working
- Enabling WP_USE_EXT_MYSQL to support old plugin
- how to access all user dashboard on fronted page [closed]
- WordPress + JavaScipt + AJAX + MySQL: insert query for form
- WordPress Backend HA (Automatic failover)
- Migrating to WordPress Recipe Plugin and Some SQL Issues
- Enabling plugin failed because MySQL user do not have CREATE permissions
- Multiple instance of data in plugin custom database table on plugin activation
- WP-DownloadManager – Query most download per week/month etc
- Better ads plugin has 500.000 entries in wp_postmeta
- pagination on data fetched using SQL query
- after wordpress update to 3.5+ i get many errors in plugin wpdb::prepare()
- Speeding SQL queries for a large database?
- Cannot get wpdb data (Error in a simple fuction) [closed]
- Notice: Uninitialized string offset: 0 in social sharing mu-plugin
- Using ‘mysqli_connect’ ‘crashes’ WordPress client-side
- Always get creating a new table with foreign key
- How to do database for download stats?
- DB Query not working in Plugin
- External wpdb connections in different plugins on single page
- speed up pagination for huge database
- Way to send multiple values for column to MySQL?
- Comment Approve – Add custom function when comment is approved
- WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version [closed]
- Can’t create tables with my plugin
- Integrating Custom Database with WordPress
- How to display results from a data table with an encrypted user id?
- Check against server time to display SQL entries – Radio Station DJ Rotator Plugin
- add_action for publish_post doesn’t work
- WordPress Cache delete on plugin uninstall
- need to find duplicated meta value in custom filed and view the posts that have the same value
- JOIN and SUM different statement results (Mailster Database)
- My CPU usage in A2 Hosting Shared Plan (Turbo Boost) is high due to mysql query!
- Getting current user data with MySQL statement
- How to get the custom field value using SQL query
- Memcaching recurring SQL Queries
- Need to know if my approach to designing a geneaology plug-in for wordpress makes sense
- What database state changes happen after a post is manually “updated” with no changes?
- WP Function does not trigger on Webhook API Call
- Cant create table on plugin activation
- How to get database connection details without longing to cpanel in WordPress?
- Performing CRUD operations on front end in wordpress
- Display a number value from mysql query in WP
- WordPress UPDATE queries on MySQL database stuck
- Store GravityForm data in phpmyadmin (mysql)
- Moving a few select DB tables to a new WP instance
- dbDelta not CREATING TABLE
- WordPress database problem wp_posts, primary key
- Login issue in WordPress
- Delete user meta based on key value that is an array
- get/show Last ID
- HyperDB failover Delay
- Resetting AUTO_INCREMENT primary key
- Create Database Tables on Plugin Activation hook
- Help with sorting and storing data on WordPress
- Slow WordPress admin panel with a total query time of 1664ms
- how to search through plugin in wordpress cimy-user-extra-fields?
- Get all the related data from WordPress DB
- How to display blog posts only authored by the administrator
- Trying to insert a row from a Plugin
- 504/502 errors plauging our site
- how to show the data from a myqsl database in a post [closed]
- Post sorting and ordering function in WordPress Admin is broken and always shows post from oldest to newest
- How can I delete the options from DB when the plugin is deleted?
- PHP Creating a formula from mysql db values and db stored math operator
- Share or sync user table data with another user table
- Split Million WordPress Post’s Into Multiple Database Server