[SOLVED] This do the Job:
function set_the_terms_in_order ( $terms, $id, $taxonomy ) {
$terms = wp_cache_get( $id, "{$taxonomy}_relationships_sorted" );
if ( false === $terms ) {
$terms = wp_get_object_terms( $id, $taxonomy, array( 'orderby' => 'term_order' ) );
wp_cache_add($id, $terms, $taxonomy . '_relationships_sorted');
}
return $terms;
}
add_filter( 'get_the_terms', 'set_the_terms_in_order' , 10, 4 );
function do_the_terms_in_order () {
global $wp_taxonomies; //fixed missing semicolon
// the following relates to tags, but you can add more lines like this for any taxonomy
$wp_taxonomies['post_tag']->sort = true;
$wp_taxonomies['post_tag']->args = array( 'orderby' => 'term_order' );
}
add_action( 'init', 'do_the_terms_in_order');
Credit goes here: Change order of Custom Taxonomy List
Related Posts:
- Custom Taxonomy Template Post List with Sort Order
- Targeting categories in custom fields
- How to display posttypes and taxonomy in standard posts, not in a separate label?
- How to get all taxonomies of a post type?
- How to Add Custom Fields to a Custom Post Type?
- Custom taxonomy not showing up when adding a new custom post type
- How do I list custom taxonomy terms without the links?
- How to list custom taxonomy categories?
- clients list using wordpress
- How to list all categories and tags in a page?
- Create an archive page for custom taxonomies
- How to do a custom bookmarks post type?
- WordPress Search documentation: how to improve search query using taxonomy terms, custom meta fields?
- How to select one major category (or custom taxonomy) for a custom post type?
- How to get the parent’s taxonomy?
- How do I list terms of a custom taxonomy at i.e. domain.com/brands/
- front end radio custom taxonomy with custom post type
- Add Taxonomy Values Within a Custom Post Type RSS Feed
- Taxonomy-{taxnonomy}.php is not working
- Display taxonomy term only if there’s a value
- Get list of terms of current taxonomy archive for another taxonomy
- Associate Taxonomies Across Post Types
- What is better: Custom Fields vs Custom Taxonomies with Terms for perfomance, scalability and better user experience
- How to add custom fields to admin UI and REST API response?
- Show Post Count of a Category
- Order WordPress Custom Taxonomy Pages & Pagination Not Working
- Relationship between two taxonomies and a custom post type [closed]
- Menu Multiple Taxonomies
- How to make a custom taxonomy selectable in post publish area?
- Problem with custom post types, taxonomy and permalinks
- How to create new category for custom post type?
- Fetch taxonomies by custom post type id array
- Custom page template for category taxonomy
- How do I get array of types associated with a taxonomy?
- Display all posts in main category and 1 subcategory
- How to bulk copy custom fields between custom posts?
- wp_get_post_terms on custom post type with custom taxonomies returning an empty array
- How to display custom taxonomies with links in filter menu?
- How to Filter custom post type by taxonomy?
- Why are taxonomy terms not saving when using custom meta boxes with radio button taxonomy selectors?
- How do I display the grand child items of a taxonomy term?
- Is it better to use WordPress Custom Post Types or Taxonomies?
- How to make custom taxonomy into drop down select in a custom metabox
- Taxonomy in URL
- How to Set Taxonomy Object Description?
- Custom post type’s extra fields – how to handle?
- Custom Taxonomy Is Being Pulled into a Page, But It Doesn’t Have A Hyperlink
- Querying two taxonomies with tax_query not woking
- Variable not working in WP_Query
- Hide meta box for everything BUT a certain custom post type
- Alphabetically sort a taxonomy.php template by post title
- Custom Post Types not queried in Custom Taxonomy archives or Native archives
- Show Taxonomies with admin area for custom post type?
- Display a post from custom post type only if all the selected taxonomies and custom field value matches the record
- Changing CPT slug and taxonomy already registered in parent theme
- How to populate a Gravity Forms Custom Post Field (dropdown type) with custom taxonomy terms? [closed]
- Custom post type name and assigning custom taxonomy
- Copy/Move selected taxonomy terms to another taxonomy for posts
- Building a Portfolio and need some direction
- Get posts by category name
- Making a form for user to add new custom post with custom taxonomies and custom fields
- Query Custom Post Type by Taxonomy
- Confusion about how to use Custom Post Types, Custom Taxonomy or Category?
- Displaying Posts Using a Custom Query with a Custom Field and a term_id
- How can i display a taxonomy? i have created a plugin and then a custom type. and a taxonomy , also i have register it
- Define multiple prefixes for custom post type
- How to order taxonomy terms by most recent post?
- Custom taxonomy returns 404 even with saving permalinks
- Create custom post type categories
- wp_insert_post deleting previous post custom meta
- Change custom post taxonomy values from front-end
- Set a Default CPT taxonomy by taxonomy id
- Adding a Section for Visitors
- List all posts associated under custom taxonomy
- How to transfer categories (default) to custom taxonomy?
- Add other all taxonomies as meta boxes to custom post type
- How to get post type archive category title
- Pages of my taxonomy terms are showing all posts
- Custom post type category link + add to menu
- Custom taxonomy template for custom fields loop [closed]
- Single taxonomy for different custom post types
- Create Inclusions and exclusions
- What’s the most efficient way to get two queries based on an if statement?
- Filter Term By Parent Term – Custom Post Type
- Best approach to allow front-end display of posts’ reviewers?
- Custom Post Type and Taxonomies, creating the corresponding template file and loop the data
- How to create TEMPLATES for TAXONOMIES? What I have to change in this code?
- List all posts from custom post type by taxonomy
- Displaying taxonomy icon outside archive page
- Show Custom Post Type taxonomy term that matches custom field
- Archive templates based on taxonomies
- Advanced search form with filters for custom taxonomies and custom fields
- See the process of creating a taxonomy and tell me where I made a mistake
- How to change order of custom post types. I want Featured post to come first
- Get all active posts that are tied to a custom taxonomy for a custom post type
- How to add to taxonomies to a post type
- Filtering custom post types using category taxonomy
- I want to understand plugin implementation of custom posts / taxonomies / metaboxes
- Is it possible for post and custom post type to share a category base slug?
- Taxonomy Archive URL + Template