How to disable Archive selection on a sort interface

Share on FacebookTweet about this on TwitterShare on Google+Share on LinkedInPrint this page

When creating a simple sort the selection area outputs the Archive and all taxonomies assigned to a particular custom post type:


The Archive selection is not always required and can be easily disabled programmatically through a filter:

    add_filter('apto/wp-admin/reorder-interface/show_taxonomy_selection', 'apto_wp_admin_reorder_interface_show_taxonomy_selection', 10, 2);
    function apto_wp_admin_reorder_interface_show_taxonomy_selection( $show_taxonomy_selection, $sort_ID )
        {
            //Only apply on a specific sort ID
            if  ( $sort_ID  !=   373 )
                return $show_taxonomy_selection;
            
            
            $show_taxonomy_selection    =   FALSE;    
            
            return $show_taxonomy_selection;    
        }

The filter is available since plugin version 4.3.3.3 The code should be placed inside theme functions.php or a custom plugin.