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:
- Change the text on the Publish button
- Placing a Custom Post Type Menu Above the Posts Menu Using menu_position?
- Row actions for custom post types?
- Loading External Scripts in Admin but ONLY for a Specific Post Type?
- Register CPTs using Dashicons for admin menu icon in WP 3.8
- How can I remove the “Add New” button in my custom post type?
- Remove “posts” from admin but show a custom post
- Add content in custom post type page after the title and before columns
- Change the edit page for a custom post type?
- How to check if I’m on a custom post type archive in the admin area
- 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?
- Creating relationships between multiple content types [closed]
- How to add custom columns to Custom Post Type admin screen
- Is it OK to move admin menu items?
- Hide/Show only specific categories in wp-admin new-post.php
- Best way to filter featured image text for a custom post type?
- WordPress Custom Post Type Admin Page really slow
- Add content before/after admin post wp-list-table
- Custom post type Admin Page
- Post slug changed using code doesn’t reflect on editor when post is published
- Filtering Posts by Multiple Taxonomy Terms such as in an Admin Post Listing?
- WP Admin default view mode for Custom Post Type
- How to programmatically create a connection with [Plugin: Posts 2 Posts] on cpt publish?
- modify all posts of a category to “no comments allowed”
- Remove date and category filters when editing custom post types
- Allow User to Edit Page Based on their Email
- Custom Metabox with Taxonomy Dropdown – Saving Issue
- how to create my own edit.php admin page code or template for my custom post type
- Displaying Post Title on Post Edit page?
- Create Pages from Database
- Backend search; include CPT meta?
- 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
- Sort custom post types by last name in the backend
- Combine tax_query and meta_query in WP_Query
- 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
- How do I add a custom button to my “edit” list? ( edit.php?post_type= ) beside “Add New”
- WordPress User Roles, Custom Post Types, and Admin views
- Add text to post list/edit screens?
- Adding menu_order to CPT admin page
- Remove “Get Shortlink” button in admin of custom post type
- 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 make in WordPress admin panel sortable column for the custom field, that count the number of page impressions?
- WP-Admin edit.php & post.php slowdown after import of 10k users
- How to remove ‘create new post’ entry for a custom post type?
- Restrict Custom Post Type to One Item
- Sql Update CPT from publish to draft and particular custom field
- How to redirect from wp-admin/edit.php to a frontend page for specific custom post type?
- Dropwdown: Get taxonomy terms from posts that share preselected terms from 3 other taxonomies
- 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
- How to override post-new.php with custom template
- Post that populates itself (almost) automatically using data from imported excel file
- Populate custom post type/custom fields from an external database
- Group based routing and administration
- Limit Number of Custom Post Type Dashboard
- Add filter button to custom post type in admin area
- “Trash”, “Draft” and count not showing for custom post type in admin panel
- Edit is changing my custom’s post type parent id
- Creating connections programmatically with common fields on CPT’s
- Custom post order when using OR relation
- Custom Post Type Pagination Problem in Admin Section
- Filtering in admin broken for custom post type in 3.8.1?
- Custom post type won’t take my custom fields
- Change the text on the Publish button
- 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
- Filtering problem
- Show posts of parent in edit.php
- admin search of pages returns custom post types
- Posts 2 Posts: query connected — orderby problem
- 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
- Change CPT Edit Target Link for Admin List
- Query custom fields with three dates – start and end does not work
- Display posts of only a certain category in WP Admin section?
- Display box in sidebar of custom post type
- How to set up a private custom post type that is accessible in the administrative dashboard?