Created
October 23, 2013 19:34
-
-
Save jhebb/7125184 to your computer and use it in GitHub Desktop.
WordPress taxonomy custom orderby description
This file contains hidden or 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
// Custom 'orderby' for taxonomies | |
function customtaxorder_applyorderfilter($orderby, $args) { | |
if($args['orderby'] == 'description') | |
return 'tt.description'; | |
else | |
return $orderby; | |
} | |
add_filter('get_terms_orderby', 'customtaxorder_applyorderfilter', 10, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment