There is an unused column, term_order, in the wp_term_relationships table that you can use to assign a custom order to the terms within your taxonomy. The order is set at 0 by default and it will take a custom query to get the order back and another solution to set the order.
Example query:
function wpse_order_taxes() {
global $wpdb;
$results = $wpdb->get_results ( "SELECT * FROM $wpdb->terms t inner join $wpdb->term_taxonomy tt on t.term_id = tt.term_id WHERE taxonomy = 'category' ORDER BY term_order ASC LIMIT 0, 10" );
$categories = array();
foreach ( $results as $cat ) {
array_push( $categories, $cat->slug );
}
return $categories;
}
This would give you back an array of terms ordered by the custom order.
Related Posts:
- Different post sort order within different categories
- How to get order of posts?
- Sort posts by tags in category pages
- How to sort posts by last name (2nd word) on ONE category only?
- Display all posts in category, with specific tag posts at top
- wp_list_categories: get latest featured_image of category
- Exclude category by slug for for each loop
- Display page of custom posts?
- Sorting Woocommerce products with numeric titles [closed]
- How to choose a sort order (for posts) per category? (ideally when creating a new category)
- Showing current subcategory
- Sort Posts By Category?
- wordpress change the loop order by dynamic value
- How to order posts by meta_value created inside loop?
- How to get_posts where ‘menu_order’ is more than 0/zero?
- Why is my loop not dynamically grabbing the correct Category and displaying all categorized posts?
- Sort posts by most recently modified
- Show Primary Category first when I display post categories
- How to redefine the sorting of product categories by menu_order?
- Custom post type, organized by categories
- Publish Categories for a particular Author on a given Post
- WooCommerce – How to show specific category first-rest of products-specific category last
- Trying to sort and display categories(not posts) by custom field: ‘order’
- Sort results by groups of numbers and letters
- Custom taxonomy/category order
- wp e-commerce group product by category [closed]
- How to check if a product is purchased within the last 365 days before displaying something
- Sort posts by first letter in the title, not by first number
- Loop Problem: Displays same set of post for all categories
- Category ID returns as ‘0’?
- Three Column Loop
- Exclude category from get_the_category
- How to filter posts by category INSIDE the loop
- Display all categories as plain text
- Natural sort / ordering wp_dropdown_categories
- loop inside a loop : search for posts in the same category
- Ascending order has strange effects on wordpress loop
- Loop order issue with Ajax filter
- How can I order all subcategories alphabetical independent of the parent categories?
- Loop random posts and display odd and even based on two alternating meta values?
- How to sort (orderby) a query done by a template function before the ‘foreach’ loop?
- WordPress redundant posts based on meta field
- How to sort custom post’s category by id from the theme’s function.php?
- Display three sequential posts on each page load, without repeating previous
- Configure query with multiple categories in a custom order?
- Show all child categories associated to post ID within loop
- Sorting posts to make those with post thumbnail show up first
- Secondary loop cuts off at 10 posts?
- My custom query not detecting the correct category
- Show last post from multiple categories using wp_list_categories
- loop mix my child-category and parent-category
- WordPress Not Sorting By Custom Field
- How to use orderby on meta_value when using Pods custom database table storage
- How to sort posts alphabetically based on a specific parent category
- How to make FSE’s query loop to order by comments number?
- How to fix pagination for custom loops?
- Jquery Slider for profile template
- Counting the posts of a custom WordPress loop (WP_Query)?
- if ( is_home() && ! is_front_page() )
- Get excerpt using get_the_excerpt outside a loop
- How to display Yoast SEO meta description in archive template for each post instead of the_excerpt()? [closed]
- Get post content from outside the loop
- Why should I put if(have_posts()), is while(have_posts()) not enough?
- Display featured products through custom loop in woocommerce on template page
- Split Content and Gallery
- Get the children of the parent category
- How to get Author ID outside the loop
- Ignoring initial articles (like ‘a’, ‘an’ or ‘the’) when sorting queries?
- How can i display the content in plaintext
- How to check if I’m on the last page of posts?
- Redirect loop when trying to login to /wp-admin/ [duplicate]
- How to split a loop into multiple columns
- Is it necessary to reset the query after using get_posts()?
- Sort pages in loop by admin’s page attributes order field?
- How to Change Order of Posts in Admin?
- Is there any difference between the_title() and echo get_the_title()?
- AJAX with loop filtering categories
- ORDER BY custom field value
- Do I need to use The Loop on pages?
- Remove the Homepage Query
- Sorting: custom query with orderby meta_value_num THEN by title
- remove tags from the_content
- group search results by post type?
- the_title() shows title of the first post instead of the page title?
- How to force excerpts / teasers in the loop
- Retrieve each widget separately from a sidebar
- Why am I being limited to ten posts on a custom loop?
- Order get_terms() By Custom Field
- Setting Custom Sort Order of Posts within a Category
- Plugin for custom sort order for categories?
- Should category.php and The Loop be used if the query needs to be customizable?
- Should I use loop in the single.php file?
- How to Change the Categories Order in the Admin Dashboard?
- Inject post (from specific category) between posts in Loop
- A search for ‘0’ returns results
- How to return results of a get_posts() in explicitly defined order
- Exclude the category from the WordPress loop
- Why do themes rely on “The Loop”?
- How do I get the category URL from get_the_category?
- Display all posts from specific categories on a page