I know this post is very old but still answering for others who reach here.
Following is a very simple filter to sort the terms as numbers. You only need to set the variable $taxonomy_to_sort
with taxonomy slug
and place it in functions.php
of your theme.
add_filter( 'get_terms_orderby', 'terms_order_as_number', 10, 3);
function terms_order_as_number($order_by, $args, $taxonomies){
$taxonomy_to_sort = "numbers";
if(in_array($taxonomy_to_sort, $taxonomies)){
$order_by .= " * 1";
}
return $order_by;
}
Related Posts:
- Ascending sort order for monthly & category view, i.e. ?m=201204, ?cat=4
- Help alphabetically sorting $terms from get terms(‘wpsc_product_category’
- Order wordpress taxonomy parent terms by their children count
- Displaying posts sorting by a custom criterion
- List CPT by menu_order with children right after parent
- Ignoring initial articles (like ‘a’, ‘an’ or ‘the’) when sorting queries?
- How to Change Order of Posts in Admin?
- visually sort ordering “custom post types” for end users
- ORDER BY custom field value
- Sorting: custom query with orderby meta_value_num THEN by title
- Order get_terms using a Custom Field
- Different post sort order within different categories
- Custom Table Column Sortable by Taxonomy Query
- Order get_terms() By Custom Field
- How to get order of posts?
- Custom order of terms for custom taxonomy in admin and website
- How to order users alphabetically by their last name?
- How to sort terms with diacritical signs?
- Sort posts by tags in category pages
- Order posts by meta_value even if meta_key is not filled
- How do I allow users to sort posts? [duplicate]
- How to sort posts by last name (2nd word) on ONE category only?
- Sorting results from JSON-API on custom fields
- How can I custom order the results from wp_list_categories?
- WP_Query -> sort results by relevance (= most tags / taxonomy terms in common)
- Sort users in get_users() in custom order
- Custom Post type sort order not working in the admin area
- How can I set a default listing order on the admin page for a custom taxonomy? (without plugins)
- Sort by custom field value
- How to sort posts with the first 2 or 3 by latest, and the rest is random?
- Custom taxonomy list and sortby letter pagination problem
- Display Custom Taxonomy Terns ordered by meta_value
- Get “wp_get_nav_menu_items” to sort alphabetically [duplicate]
- List taxonomy terms plus their latest post ordered by post date
- Custom Taxonomy terms with latest post ordered by date pagination issue
- Sorting Attributes order when using get_the_terms
- Adding Sorting to Website?
- Ordering Posts with Custom Taxonomy Terms Array
- How to choose a sort order (for posts) per category? (ideally when creating a new category)
- Sorting by tag or category
- Customize the Sorting Dropdown in WooCommerce
- Orderby Post Views
- Creating a category page by alphabet
- Arrange and separate posts
- Sort a custom post type array numerically
- Sorting posts by multiple values, combined
- Meta query with order by another custom field
- Change default ordering of taxonomy terms – pre_get_terms
- Ordering terms before displaying posts
- Sorting get_post_ancestors array
- wordpress custom_meta ordering of timestamps
- Multi-level ordering in WordPress
- Sorting for custom column in WordPress admin post table
- How do I sort posts with multiple pages
- get_terms orderby numeric
- Vertical alphabetically post columns
- orderby:date not working
- Advanced custom fields sort repeater by date
- Ordering of gallery images without using shortcode in theme
- Combining sorted and random CPT
- Show listings from Impress Listing plugin in random order using taxonomy and terms
- Use pre_get_posts to sort meta_key by an array of values
- Sorting custom post type by usermeta
- Wp_query: sort by PHP variable
- Allow user to set custom order to a list of custom taxonomies?
- Sort posts by meta key that is serialised with other meta keys
- Sort query_posts for Parent Pages to menue order or the count?
- orderby field – list of available options?
- Show Primary Category first when I display post categories
- How to redefine the sorting of product categories by menu_order?
- User Query sort on custom field then name
- Sort wordpress custom posts based on meta value
- WP_Query: Group events by year, sorted DESC; then by date for each year group, sorted ASC
- Understanding the orderby in WP_Query?
- Sort order by slug for looped child terms of custom taxonomy
- WP Query sort by meta value
- How to sort posts inside categories
- How to order posts by title after they have already been sorted by category
- Help ordering Post loop by two meta values
- Ordering Taxonomies / Changing term_id
- Best Practices for a Completely Customizable Homepage – without plugins
- Trying to sort and display categories(not posts) by custom field: ‘order’
- Custom taxonomy/category order
- How to display posts via custom taxonomy terms using checkboxes?
- Sorting posts by custom field value
- wp e-commerce group product by category [closed]
- How do I create a sort capability by Title, Category, Author, Date?
- how to get post order by post id wp_query?
- How to avoid duplicating same meta_value?
- Sorting/Filter posts from front-end in WordPress blog
- ‘sort_column’ => ‘menu_order’ not working
- Custom post type sorting: alphabetical order
- ORDER BY custom field value out of where clause
- Weekdays as terms – How to order taxonomy terms by ID in admin panel?
- I would like my page editor to be sorted by date created, or updated, instead of in Alpha order, is this possible?
- How to Order a list of taxonomies? orderby?
- Sort custom posts in archive by multiple values: date AND meta key
- Sort scheduled posts in ascending order by default
- How to sort by number
- sort items by randomness