Skip to content

Instantly share code, notes, and snippets.

@EvanHerman
Created December 11, 2015 19:39
Show Gist options
  • Save EvanHerman/4e83fda88d2b210dce95 to your computer and use it in GitHub Desktop.
Save EvanHerman/4e83fda88d2b210dce95 to your computer and use it in GitHub Desktop.
Enable taxonomy sorting (tax_position) for default WordPress taxonomies (post - categories etc.)
<?php
/*
* Enable drag & drop sorting on default WordPress taxonomies (ie: categories) - (page/post)
*/
add_filter( 'register_taxonomy_args' , 'add_tax_position_support', 9999, 3 );
function add_tax_position_support( $args, $taxonomy, $object_type ) {
if( 'category' == $taxonomy ) {
$args['tax_position'] = true;
}
return $args;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment