I would use get_categories() to first get an associative array of all the categories and then sort it how you want it.
$categories = get_categories('include=16,17,15');
Related Posts:
- Allow users to create their own feed from selected categories?
- get_field not displaying my custom field value
- How to list child categories in custom category template?
- Assigning a category to a user role
- Is it possible to disable certain user roles from creating tags?
- Divi change project slug based on category
- Are Custom Taxonomy Templates Possible?
- Remove Categories and Tags from Admin Dashboard
- Custom category link in wp_list_categories()
- Using widget logic I want to show only a widget on the archive page if there are no posts
- Add a wordpress blog to my website having users
- Allow contributors to add categories, but not delete
- Show all posts of sub category in a page like: foo.com/category/subcategory/ using UNCODE Theme
- Replace category titles
- PHP Fatal error: Cannot use object of type WP_REST_Response as array in wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
- WordPress categories being called “archives” in google links. How to remove?
- 403 forbidden on one page only
- Show recent posts from one category on a non-WP site
- Multiple Category Search
- Omit specific product categories from WooCommerce shortcode
- Exclude Posts From Specific Category from Next and Previous post links
- how to query posts and auto assign category if post title has keyword
- I want to display posts common in 3 categories [closed]
- Displaying just one new/current post per category in homepage
- categories on attachment page
- A single category with a specific permalink structure differing from the standard set for the rest of the site
- List only child categories within posts
- Admin comments and user restrictions
- category url structure
- Order by category titles
- How to conditionally hide author name on Single.php if category is “news”, otherwise if category is something else display author name?
- How to let users choose posts order in categories?
- WordPress category
- How to restrict user to choose 1 category for a post
- Different Output for “Every Other” Foreach Statement?
- And/Or Category Query
- Show subcategories on a parent category page
- How do I add Category Body Classes to Admin?
- not all categories being displayed
- Category archive is displaying all posts rather than the specific category
- Use the category name instead of category slug in permalinks
- How can I display the number of post associated to a category in Twig/Timber WordPress? [closed]
- How to display the parent category if only the child category has been chosen
- Multiple Category Search with and operator in WordPress
- get_posts() from parent category only using a shortcode
- Display list categories from CTP
- Different CSS class by category
- Remove any product that is featured from regular display loop [WooCommerce]
- Latest updated categories list query, exclude one from displaying
- How the posts and categories connected each other in wp 4.1.1?
- Get categories list with category name in custom WP_List_Table class
- Getting parent category hierarchy as objects from category template
- Ordering categories by slug vs. name
- Using in ‘category_name’ in ‘$query->set();’?
- Setting selected term_id with wp_dropdown_categories?
- how can i hide category?
- Homepage custom recent news
- post_class remove tag- or category- from slug
- creating categories programmatically
- Pagination for a category
- Assign a list of categories with a parent category
- Custom post type archive category page results in 404
- How do I remove pagination from just some Categories?
- WP-CLI Add category as menu item main-menu
- Using custom structure prefix showing 404 for sub-categories
- Can’t get selected value from wp_dropdown_categories or get_categories
- How to get specific (grand parent) category of current post?
- Blog page with posts from specific categories
- Exclude a category and post_type from wp_query
- How to remove parent category from child category url using wordpress rewrite rule?
- loop in single.php of the same category
- Deleted categories still listed until additional page refresh
- How to assign Categories and tags inside the TinyMCE Editor for each Image?
- outputting taxonomy hierarchy
- Make category archives page in menu non-clickable
- Exclude specific Categories from displaying on post but not in lists
- Alpha list no longer works it multiple names
- Display Some text in some specific category not all category
- Why use hierarchical taxonomies instead of many custom taxonomies?
- Breadcrumbs and Categories
- Search by tag, category and author without plugin
- Jetpack Mobile Theme: when on smartphone on categories the theme suddenly changes to jetpack mobile theme even though it’s deactivated
- How to show posts only for the last subcategory?
- Hide category links if there is nothing in the categories – Main Navigation submenu item
- Create monthly archive for parent category
- Different styles for categories – need to edit a plugin
- Unable to get all tags from specific categories
- Hide all posts by an author
- How to display post title and link within wp_list_categories()
- Removing short versions of category archive URL
- Custom Category Page Not Working [duplicate]
- Right way for setting categories
- Rewrite category list as an if / else statement
- Displaying just one post from each category on archive page
- Exclude categories from homepage but not from sidebar
- Exclude Specific Categories?
- Featured image for links and categories
- How to change category id on get_posts array
- IF have_posts contains posts from a certain category
- Display category tree of a post in search results