You may consider using the get_terms() function to generate a list of the items in a custom taxonomy. I’m sure there are other good ways of doing this, but there are plenty of parameters here you can try out to get the order you need.
$terms = get_terms( 'custom_taxonomy_here', 'orderby=count&hide_empty=0' );
if ( ! empty( $terms ) && ! is_wp_error( $terms ) ){
echo '<ul>';
foreach ( $terms as $term ) {
echo '<li>' . $term->name . '</li>';
}
echo '</ul>';
}
In the example above, orderby
orders the terms by their count (but there are other arguments for a different order) and hide_empty
to display terms whether or not they are associated with a post.
Related Posts:
- How can I select a primary category?
- Add custom taxonomy under the category title
- How to view WordPress’ default category IDs?
- How to redefine the sorting of product categories by menu_order?
- WooCommerce – How to show specific category first-rest of products-specific category last
- Filtering *out* a taxonomy from the admin post list
- Custom taxonomy/category order
- Redirect to another page using contact form 7? [closed]
- Include WooCommerce product to all child categories
- List just subcategory and products of active category page in Woocommerce
- Grandchild Term Things Grandfather Term is It’s Parent
- How do order product categories – on a parent category page – in Woocommerce?
- How can i change what one category displays?
- Remove any product that is featured from regular display loop [WooCommerce]
- Two Sections on Woocommerce Catergory Page [closed]
- Natural sort / ordering wp_dropdown_categories
- How to set acf color field as background color to product category
- How to target all woocommerce categories that don’t have any subcategories in them?
- Show the parent taxonomy by creating shortcode in woocommerce?
- Get WooCommerce product category list in functions.php
- Filter custom taxonomy posts via AJAX
- How to add a post with new Taxonomy without assigning to default category?
- Woocommerce – Display product category of product in Orders page
- Add custom fields to Woocommerce Category Page
- How to Change the Categories Order in the Admin Dashboard?
- Control term order on a per-post basis
- How to remove categories filter from wordpress admin?
- Display all posts in category, with specific tag posts at top
- Create terms when registering taxonomy?
- How to set up sub-categories for author pages?
- How do I edit pre_get_post for the category the user is currently in?
- Does WordPress Offer a Way to Find All of the Categories that Don’t Have Children?
- Select category in custom query
- Display WooCommerce product categories in a 4 columns custom menu [closed]
- wp_list_categories, Add class to all list items with children
- Display empty taxonomy terms with get_terms()
- Connecting WordPress gallery to custom categories (taxonomy)
- How to get the depth of a category’s subcategories
- Hide post meta data on a specific category
- New categories are now going to 404s
- Format Brand value in Category view [closed]
- Best way to programmatically link to multiple categories (union/intersection) [closed]
- “Reversable” and “Re-useable” Subcategories (or other taxonomic structure)
- What is the advantage of using header-catname.php over is_category(‘catname’);?
- Remove ‘rel’ attributes from the_category() output
- Get multidimensional array that reflects category hierarchy
- in_category() works in single.php but not in page.php?
- Use a wordpress page to display a certain category
- WC 3.x Get categories from variable product of the cart
- Force a user’s posts category
- Search Posts / Pages with multiple options?
- Automatically exclude categories from metabox based on title
- How to categorize posts under Category 1 and Category 2 which are separate lists of categories, and display them as separate lists in widgets
- Change thumbnail image depending product category
- How to organize custom categories for filtering and selecting
- Why don’t posts show up in my categories on the frontend?
- How many categories can WordPress handle before performance suffers?
- Keyword search in multiple categories
- Targeting Parent Category Pages
- Display single category name in woocommerce loop
- woocommerce related products by specific categories [closed]
- How to make the ‘delete’ button inactive on some categories?
- Notice: Trying to get property of non-object in : custom fields category
- How to change the order of the subcategory and category in a post?
- WP REST API not retrieving all categories
- Some categories missing on wp-admin/edit-tags.php?taxonomy=category
- Multiple selection for wordpress widget
- Eliminate word from $term->name
- Theme for subcategories
- How to schedule categories?
- Template for product-category page [closed]
- Add code to header based on category for specific posts?
- Copy post taxonomy?
- custom query for both category and pages using global $wpdb;
- List post only under the category, exclude child category content
- Custom Portfolio Page
- show only sub categories if available?
- Combining these queries? (Same taxonomy term + same category as post)
- displaying the last product comment in the woocommerce category
- Disable Category Taxonomy
- How to make product image inherit from category image
- How to edit woocommerce sub-category page
- Filtering posts in category by tag URL
- Woocommerce Category Sort Dropdown
- Woocommerce: all products of all categories instead products of one category
- Image Upload Custom Form Field for Category and Custom Taxonomy
- Category custom template is not showing correct posts
- Send default WooCommerce email when switching from custom order status
- Woocommerce change tag_id to name
- Need help to structure our a complex hierarchy
- Configure query with multiple categories in a custom order?
- get_adjacent_post_link excluded_terms ignored
- Category menu that filters out empty categories
- Taxonomy for custom post type not found
- Category base 404 – fix
- Sorting Woocommerce products by category and attributes
- How to get Woocomerce categories count
- Categories and products woocommerce wordpress
- Images as Categories
- Quick Edit on taxonomy names results in error