skip to Main Content

WordPress – How to display a list of subcategories in order by name and not in chronological order?

I have categories and subcategories. The category page displays the subcategories under it using the following code: add_shortcode( 'list_subcats', function() { ob_start(); $current_cat = get_queried_object(); $term_id = $current_cat->term_id; $taxonomy_name = 'category'; $term_children = get_term_children( $term_id, $taxonomy_name ); echo '<ul class="list-subcats">';…

VIEW QUESTION
Back To Top
Search