Not as far as I am aware. WordPress tends to view post categories in ID order (ie date created).
ok that went better than expected, i have it working fine using the ‘advanced custom fields’ plugin to create a dropdown in the post edit screen
if nothing is selected, it highlights the categories as it does with wp_nav_menu, whether it’s one category or several
if a primary category is selected, it highlights only that one
if disable highlight is selected, no menu items are highlighted
<ul id="testmenu">
<?php function sportmenu($sport) {echo '<li><a href="'.get_term_link($sport,'sports').'" id="msport-'.$sport.'">'.$sport.'</a></li>';}
sportmenu('Basketball');
sportmenu('Football');
sportmenu('Hockey');
sportmenu('And So On...');?>
<?php global $wp_query;
$psport = get_field('primary_sport');
$osport = get_the_terms($wp_query->post->ID,'sports');
if ($psport) {
if ($psport != 'none' && $psport != 'disable') : ?>
<script type="text/javascript">
$('#testmenu #msport-<?php echo $psport; ?>').addClass('active');
</script>
<?php endif; if ($psport == 'none') : ?>
<script type="text/javascript">
<?php foreach($osport as $term){echo "$('#testmenu #msport-".$term->name."').addClass('active');";} ?>
</script>
<?php endif;
}
?>
</ul>
yes you can see that i’m actually using custom taxonomies instead of built in categories, I AM INVINCIBLE