php - Wordpress - Alphabetically Order Taxonomies (get_taxonomy) -


i have following code outputting categories have drop-down. i'm trying alphabetically order these categories in drop-down make easier users find them.

<?php // output dropdown each taxonomy //   foreach ($taxonomies $tax) { ?>     <div id="<?php echo $tax . '_cat'; ?>">   <label for="wppl-category-id"><?php echo get_taxonomy($tax)->labels->singular_name; ?>: </label>   <?php custom_taxonomy_dropdown($tax); ?>               </div> <?php } /* end foreach */ ?> 

i looked , seems get_taxonomy has no orderby options (at least find). there suggestions how this?

thanks!

maybe can check native function get_terms?

it has orderby argument , believe can order them name.

there example there, if replace count name this:

$categories = get_terms( 'category', 'orderby=name' ); 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -