Sorting for each custom taxonomy

Is there a way to handle this unique
ordering for each term in the
taxonomy?

You can use custom fields to store the order of the players (e.g.: team_order, league_order, position_order). And dynamically modify the order in your index, archive or taxonomy template file (whatever you use):

if( is_tax(array('team','league','position')) ) {
    if( is_tax('team') {
        $wp_query->set('meta_key', 'team_order');
    } elseif( is_tax('league') {
        $wp_query->set('meta_key', 'league_order');
    } elseif( is_tax('position') {
        $wp_query->set('meta_key', 'position_order');
    }
    $wp_query->set('orderby', 'meta_value');
    $wp_query->get_posts();
}

Additionally, is there a way to add
multiple custom fields for a taxonomy
(ex: team, which contains a team name,
logo, description, and coach)?

No way, out of the box, You can store this in a custom post type or the options table.

Leave a Comment