1. Home
  2. Knowledge Base
  3. Posts Table Pro
  4. Advanced Usage
  5. Disabling sorting in the posts tables

Disabling sorting in the posts tables

If you want to disable sorting for individual columns in the table, please see the posts_table_column_sortable hook in the Developer Documentation.

If you want to completely disable column sorting in your posts tables, you can use the following code. Add this to a custom plugin or inside your theme’s functions.php file:

// Disable column sorting
add_filter( 'posts_table_inline_config', 'ptp_disable_column_sorting', 10, 2 );
function ptp_disable_column_sorting( $config, $posts_table ) {
    $config['ordering'] = false;
    return $config;

Was this article helpful?

Related Articles