It’s already a hierarchical
post type – no need for some extra meta value just for the order. You can simply add post type support for page-attributes
when registering the post type. This will give you the “menu order” meta box that pages have per default.
Then simply order your query by it:
'orderby' => 'menu_order'
Related Posts:
- Tax query array terms display out of order
- Order get_terms using a Custom Field
- Display Custom Taxonomy Terns ordered by meta_value
- Custom Taxonomy terms with latest post ordered by date pagination issue
- Dynamically tax_query terms
- ‘wp’ action hook not firing in admin and login?
- Taxonomy archive showing no results
- Sort order by slug for looped child terms of custom taxonomy
- Weekdays as terms – How to order taxonomy terms by ID in admin panel?
- Create alphabetical Pagination for custom taxonomy?
- How to add a date creation field when a custom taxonomy relationship is created?
- Order taxonomy terms wordpress
- Orderby taxonomy term id using get_posts not working
- Sorting terms individually for each post
- Order posts with custom taxonomy array
- get_the_term_list without links in 3.1
- Inserting terms in an Hierarchical Taxonomy
- get_term_children for immediate children only (not grandchildren)
- Is there a way to ‘Lock’ a Taxonomy?
- Creating a non-removable taxonomy term
- Return only the custom sub-term for custom post type, do not echo term-parent
- wp_insert_term is adding a term that has no name
- Get terms from multiple taxonomies
- Formating the_terms() function output
- Using tax_query creates a 1 = 0 or 1 = 1 in $wp_query->request
- get_terms showing link to category even if all posts are drafts
- Determine if Term has Grandparent/Great-Grandparent
- How can I set a default listing order on the admin page for a custom taxonomy? (without plugins)
- Retrieving custom taxonomy in order, but excluding specific tax IDs
- get taxonomy terms for parent and child
- Taxonomy query for children of parents
- tax_query not working on main query
- Separator for multiple terms
- Contact Form 7 – Populating dropdown list with terms relative to the post
- How to create a theme template for the taxonomy “root”
- why do drafts return as part of wp_query?
- How to handle “the_terms” inside loop
- Display the Terms from a Custom Taxonomy Assigned to a Post(inside the loop) in Hierarchial Order
- How to create drop down for child categories of current taxonomy being viewed?
- How to dynamically add custom taxonomy terms as a sub-menu of an existing menu item, using custom walker class
- Get terms ordered by post date
- pre_get_posts Tax Query not working for custom author page
- get_terms in a taxonomy template
- Custom taxonomy query not working with switch_to_blog
- Display hierarchical subterms of custom taxonomy based on depth
- Get Current Custom Taxonomy ID by Post ID
- Show listings from Impress Listing plugin in random order using taxonomy and terms
- Use get_the_terms to list subcategories of custom taxonomy
- AJAX response, edit tags
- List child terms if parent but show nothing on children
- Get_terms stopped working after WP 4.2
- Display Taxonomy Terms in an option tag with value being the slug
- orderby meta_value breaks taxonomy term archives
- If post has ANY term attached to it, get the first one only
- Getting Term ID from Term Name for WordPress Query
- Allow user to set custom order to a list of custom taxonomies?
- Show only the grandchildren (using get_terms)
- Manipulate WP Query using a custom post type and multiple tax_query taxonomies
- wp_insert_term created and set for first once only
- Updating / Saving items generated by wp_terms_checklist on frontend
- Rewrite rules for varying nested terms of custom taxonomy
- Display all posts that use a custom taxonomy
- Set tax_query conditionally with new WP_Query
- Count Number of Posts in Taxonomy Term in Last 24 Hours
- Update table wp_term_taxonomy.count after INSERT INTO via SQL
- How can I reduce amount of ifs and else ifs in this specific block of code?
- Are term IDs unique even between multiple custom taxonomies
- What is the action hook that deletes a taxonomy term from the backend? And how to retireve the term id before deleting it?
- Get all attachments by custom taxonomy – term
- Get terms that don’t belong to current post with a shortcode
- How to get posts that contain multiple terms from multiple taxonomies?
- Cannot delete or edit a single term in a custom taxonomy, taxonomy name is wrong?
- How best to store data (URLs and IDs) extracted from posts and pages using custom taxonomies
- Get name of taxonomies of current page
- export and import taxonomy terms from one taxonomy to another
- URL rewriting taxonomy term
- Find terms in a custom taxonomy based on the hirearchy
- Wp_query…a type of term a different div
- Show all terms in a custom taxonomy with all child terms wrapped in a ul
- Show single Child Category on Custom Post
- Pull data from MySQL and add it to terms
- Ordering terms whilst in loop
- how do you pull data from two taxonomies?
- wp_insert_post not adding taxonomy (using wp_set_object_terms)
- Filter “get_terms” query
- generate random slug when adding taxonomy
- How to filter a taxonomy meta field to the ‘single_term_title’ filter hook
- Custom post type term names with ampersand in the term name
- If page is a taxonomy do X, if is a term, do Y
- Query pages by child term
- Getting the parent terms adds additional empty markup [closed]
- Custom taxonomy list in two columns
- Taxonomy term breadcrumb; how?
- Insert term description programmatically into hierarchical custom taxonomy
- get multiple values from $_GET from multiple checkboxes
- Transfer taxonomy to custom field
- Get post terms with hierarchical relationships
- Taxonomy archive link from term id
- How can I get the term_id from the action hook ‘set_object_terms’?
- Foreach for get_the_terms for hierarchical taxonomy don’t repeat Top Level Terms if contains multiple Second Level Terms