The way I previously did this, was by adding a custom field to my CPTs, and ordering by that value when I fetched my posts with WP_Query.
$myquery = new WP_Query( array(
'post_type' => 'your_post_type',
'meta_key' => 'my_custom_field_name',
'orderby' => 'meta_value'
)
);
However, I believe if you add ‘page-attributes’ to your ‘supports’ parameter when you register your CPT, you have the ‘Order’ field available, which you can order by.
$myquery = new WP_Query( array(
'post_type' => 'your_post_type',
'orderby' => 'menu_order'
)
);
Related Posts:
- How to get post content by calling ajax?
- How to properly turn off REVISIONS and AUTOSAVE for whole site and optionally for a custom post type only
- Replacing the title in admin list table
- Order by & include array by specific post ids
- How to remove /blog/ prefix for custom post types in permalinks?
- Can I change a custom post type label from a child theme?
- Get category id from post id of a custom post type
- How to model a hierarchy for courses, levels and lessons?
- Hide custom post type field from author?
- Customize users’ capabilities to change a custom post’s post status
- wordpress plugin error handling
- The right way to create a custom search page for complex custom post types
- wp_generate_attachment_metadata gives me an empty array
- Custom permalinks
- WordPress 3.1 – How does one add sticky post capabilities to post types
- Permalink for CPT with taxonomy
- Delete all the custom post types when deleting user
- Custom Post Type Works but Still Shows “Page Not Found”
- order of date column in custom post type
- Maintaining WP_Query Relation Among CPT, Custom Taxonomy, Permalinks- CPT UI
- Add filter to wp_list_categories and query what type of taxonomy-terms it use?
- Custom post type category, taxonomy and URL rewrite problem
- changing default comment form arguments [duplicate]
- Dropdown list of a custom post type
- Is there any performance consideration when using Custom Post Types?
- Change labels of custom post type via child theme
- How to display recent / random posts by its category
- Good way to store content and settings for an RSS plugin
- Exclude specific taxonomy term when using wp_get_post_terms
- Custom Post Type with metaboxes (no content) only?
- Querying Term Posts in Loop
- orderby in custom WP Query does not work
- Getting rid of /my_custom_post_type/ in the single view URL
- Dequeue scripts and styles only for specific custom post type
- One-to-many post relationships that are displayed by category (using posts-to-posts plugin)
- Custom Post Type And “fopen”
- custom types taxonomy hide_empty
- will post_id ever change? Can I safely use post_id for custom queries?
- How to set individual capability of post type in individual category
- wp_get_archives() not working for my custom post type
- Using advanced custom fields from one custom post type in another custom post type / using nested shortcodes
- Custom post URL 404 error
- Add Custom Post Type as top level menu item for a custom page
- Order by custom field meta_key date and then by custom file meta_key number
- How can I move (or create another) publish button?
- Wrap meta boxes & data handling for specific post types in classes?
- don’t publish custom post type post if a meta data field isn’t valid
- WP Query post__in not returning correct results
- get_the_post_thumbnail_url(‘full’) returns empty from custom post type
- Proper way to display latest 5 posts grouped by post type?
- Query multiple taxonomies with pre get posts
- How to set up Custom Post Type archive page as Front page
- A meta box (in a custom post type) with two different type of fields
- Give each post type label a different color?
- Custom Permalinks For CPT and pages with parent. Advanced WordPress
- CPT is simply not displayed in the main archive with “pre_get_posts”
- How to add a filter to a custom post type to get adjacent custom posts via the REST API
- How to rewrite the post slug of a custom post type post
- I’m trying to create a custom version of the wp_list_authors function that includes custom post types
- Getting List of child terms from custom taxonomy parent
- Plain links in single-class.php and archive-class.php not working
- How can I get 3 different taxonomy type terms in a div class element?
- the ‘save_post’ event triggers when I want to start a new post
- Getting titles from an array of IDs
- How to show all CPT posts in one page?
- Custom post rewrite rule not working
- How to change CPT single post slug
- 2 Custom Post Types In 1 Archive Page?
- custom post type and user post count shortcode
- Why it doesn’t create a custom post type after form submitting
- What is the correct way that when creating a custom post type assign values to custom fields created with pods framework?
- Get all post types that supports tags
- Google analytics not picking up custom post type
- Guided post type create based on category tree
- Specific template for subcategory of custom taxomy
- Do not parse shortcode in CPT
- Advanced search form with multiple custom fields
- Group Custom Posts Types in a Relation field of ACF
- Custom Field Filter by Role – WordPress
- Convert Custom Post Data to Javascript Array for Autocomplete
- Adding Custom Taxonomy Along-with Post Name in Post Type Permalink
- Style post formats differently only in single
- Retrieve custom post by a query on one of its custom fields
- Conditional posts in WP_query for search
- Loop posts in a table ordered by a custom field value
- Simple term-archive-linked Taxonomy Entry output
- archive.php can’t find categorized posts
- Nav style for current page with custom post type
- custom taxonomies are not showing up in get_taxonomies
- How can I pull information from my loop and divide them seperately?
- Submiting custom form give error 404
- Metabox textarea showing whitescreen
- How to loose the image ‘alt’ attribute in my custom post type?
- 2nd and 3rd Custom Post Type URL’s 404ing
- Data won’t save on a straightforward metabox, what am I missing?
- Using tax_query to get single post per category
- Create taxonomy from Custom Post Type
- img src not working correctly in custom post type
- How to “Custom Post Type” as a non-programmer?
- Tracking Total Pageviews By Post Type In Google Analytics