I finally found the answer. Turns out I just needed a better understanding of WPQuery.
It ended up being as simple as:
function order_pages_by_ID( $args, $ctype, $post_id ) {
if ( 'posts_to_pages' == $ctype->name ) {
$args['meta_key'] = '_event_start_date';
$args['orderby'] = 'meta_value';
$args['order'] = 'asc';
}
}
Related Posts:
- How can I remove the “Add New” button in my custom post type?
- Change the edit page for a custom post type?
- Admin Filter – Add Post Type Description on Post Type Page
- how to group custom post types
- How do I filter the excerpt metabox description in admin?
- How to add custom columns to Custom Post Type admin screen
- Is it OK to move admin menu items?
- WordPress Custom Post Type Admin Page really slow
- Custom post type Admin Page
- Post slug changed using code doesn’t reflect on editor when post is published
- WP Admin default view mode for Custom Post Type
- Remove date and category filters when editing custom post types
- Getting Post ID from slug during init
- How do I write this SQL statement for Posts written in last 24 hours?
- How to programatically set the post title of a CPT on wp-admin
- How to Change the Title of a Meta Box on a Specified Custom Post Type? [duplicate]
- Make a custom column sortable, by custom post count
- Using multiple instances of wp_editor in Custom Post Type admin area
- How i add new link after Edit | Quick Edit | Trash | View in quick edit section
- Custom Post Type Name Causing Problem
- How to add post_author column to custom post type
- Use a textarea for a custom post type
- Restrict categories to a custom post type
- Changing the header on post listing page in admin area
- WordPress User Roles, Custom Post Types, and Admin views
- Need functionality with all post list available at edit.php
- Query to change custom post type with specific category
- Show hierarchical relationship between to custom post types on admin list
- Show Custom Post Type values in WordPress grid view
- Connecting a taxonomy with a post type
- Mass convert MySQL data entries into custom post type?
- Calculating Bayesian average for custom post type
- How to remove ‘create new post’ entry for a custom post type?
- How to customize admin posts based on the user who is logged in
- Change headers in admin posts list
- Admin notice not displaying
- Custom Post Type + 20k posts = blank/404 within Admin edit.php [duplicate]
- Adding custom tables to WordPress
- Remove rows in the manage post/page view
- Admin not showing all custom post type posts and views not working
- Display post meta on edit page in admin
- Insert post metadata for all posts in CPT at once if metadata no existent
- Modify action buttons for custom post type
- Admin Pointers on a custom post type
- Add a button or image button that calls wp functions in the wp-admin
- How to add a custom-post-type post within another custom-post-type post edit screen using AJAX?
- CPT post count is 0 for the authors in the User list
- Possibilities for the edit.php admin panel? [closed]
- Filter hierarchical custom post type admin page by parent, and include children & grandchildren
- Admin Filter – Add Post Type Description on Post Type Page
- Custom post type editor with dynamic selects, one drop down populating a second second drop down not working
- How to import a custom MySQL DB table into a WordPress custom post type
- WP-ADMIN – Listing all CPT in “posts” listing
- Function causing the loop display posting more (empty)
- Custom Postype specific changes in admin panel
- It’s possible to hide body copy box for a custom post type?
- Show data from one Custom Post Type in another Custom Post Type
- Add a custom text to admin footer in a Custom Post Type page
- Creat new admin url for custom post type
- Set thumbnail and title for a post type archive (not post itself!)
- Custom WP_Query doesn’t display all posts
- Navigate posts with different post type that are in the same categories
- Change link for “add new” buttons on custom post type
- Custom capabilities not reflecting on admin panel
- How to limit what Editors see in the admin?
- Questions regarding add_meta_box()
- How to import database table as custom post type and custom fields?
- $wpdb is queried but results don’t show
- Change Post Meta via AJAX from the posts list table
- Custom Attachment Type
- Sorting custom post types in edit.php : Post disappear
- Sort by post word count in admin area
- How to display magic field’s custom write panel in wordpress theme?
- Change ordering of fields of custom post type in admin page
- Admin slow on Postlist (over 30k Posts in Database)
- Hide title field of selected post-types on edit pages
- Fetch data of 2 relational Custom Post in WordPress
- After inserting new post with wp_insert_post() the post is not visble to WP_Query, but the same WP_Query works for post inserted from wp-admin panel
- Put featured image under post title in admin area
- Admin Post Table – Remove Title Edit Link
- How do I create a customised table list of a custom post type (in the admin area)?
- Restrict Custom Post Type to One Item
- How to redirect from wp-admin/edit.php to a frontend page for specific custom post type?
- exclude admin archive edit screen
- Simple Data picker meta box
- In the admin, how can you list thumbnails instead of titles for a custom post type?
- Custom post meta box as a sub form
- Add filter button to custom post type in admin area
- “Trash”, “Draft” and count not showing for custom post type in admin panel
- Creating connections programmatically with common fields on CPT’s
- Custom post order when using OR relation
- Show a custom field instead of username in the backend author area
- Can’t preview custom post – Redirected to home page
- How to make an admin create/edit post page to look like taxonomy page?
- Problem with a query in custom posts
- Show posts of parent in edit.php
- admin search of pages returns custom post types
- Create a WordPress Database query to find users who purchased specific product through WooCommerce [closed]
- Assign a tag to custom post type using a query
- Custom order of CPT posts by title, in wp-admin area by default