Created
December 11, 2015 19:39
-
-
Save EvanHerman/4e83fda88d2b210dce95 to your computer and use it in GitHub Desktop.
Enable taxonomy sorting (tax_position) for default WordPress taxonomies (post - categories etc.)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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