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
- How to Change Order of Posts in Admin?
- visually sort ordering “custom post types” for end users
- Different post sort order within different categories
- Custom Table Column Sortable by Taxonomy Query
- Order get_terms() By Custom Field
- Custom order of terms for custom taxonomy in admin and website
- How to order users alphabetically by their last name?
- 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]
- 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)
- 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?
- How to choose a sort order (for posts) per category? (ideally when creating a new category)
- Arrange and separate posts
- 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
- Sort posts by meta key that is serialised with other meta keys
- Sort query_posts for Parent Pages to menue order or the count?
- 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?
- How to sort posts inside categories
- 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’
- 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?
- Custom post type sorting: alphabetical order
- Weekdays as terms – How to order taxonomy terms by ID in admin panel?
- How to Order a list of taxonomies? orderby?
- Sort custom posts in archive by multiple values: date AND meta key
- Order get_terms by multiple meta_values
- Sortby parameter to sort users
- How to manage a particular “order by” for get_search_query()?
- view subcategories order by id
- ASC and DESC separately from orderby
- Sort my event calendar by date
- orderby ignored by wp_query
- Sort query_terms_list for post_tags alphabetically
- How can I order a post query’s results based on the number of matching taxonomy terms?
- Sort products by Sale price and stock status
- How to sort store location by specific category order in WP store locations
- How to sort products by price ASC and place all no price products to the end? (Woocommerce)
- sort title descending with title with number
- How to order taxonomy terms by most recent post?
- Listing Cities A custom taxonmy by selection order
- ACF pro: Group teaser by datepicker year and display custom sub fields [closed]
- WP Query with meta queries
- Sorting in WP_List_Table class
- Wp Query sort order from custom MetaBox
- Orderby Title not working
- Multiple sorting criteries (order by)
- Using Orderby and meta_value to order natural/alphanumerical
- How to sort (orderby) a query done by a template function before the ‘foreach’ loop?
- Sort an array with an ACF meta key
- Pin to Top Functionality using orderby custom field then event date
- Display three sequential posts on each page load, without repeating previous
- Group & Sort Taxonomy terms by letter – Is there a better way?
- Orderby taxonomy term id using get_posts not working
- display wordpress user who published a pending post of another user
- Custome column sort by date not title
- Advanced sorting of content in wordpress [closed]
- How to order posts by the user_login that corresponds to a meta_value (which is a user id)?
- Grouping posts starting with same letter
- Tax query array terms display out of order
- Order posts with custom taxonomy array
- Getshopped (WP-e-commerce): show all protucts on one admin page for drag-and-drop ordering [closed]
- ISOTOPE – Missing/Invalid Arguement Get Terms
- Can One Taxonomies Terms be Ordered by A Seperate Taxonomy?
- Can’t sort custom column on user.php by number / meta_value_num?
- How do i Sort my Posts