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

How do get a dropdown of all countries in WordPress

Is there a shorter way to get all countries populated options, instead of writing options one by one, in the following dropdown? <select name="input-country" id="input-country" class="form-control form-control-alternative"> <option value="">Select a country / region…</option> <option value="AF">Afghanistan</option> <option value="AX">Åland Islands</option> <option value="AL">Albania</option>…

VIEW QUESTION
Back To Top
Search