Using WP_Query with sort in Admin
-
I have a page where I use wp_query to display a custom post type. The args I pass to it are as follows:
$args = array( 'post_type'=> 'fsga_breakouts', 'post_status' => 'publish', 'posts_per_page' => -1, 'meta_query' => array( array( 'key' => 'fsga_breakout_conf_id', 'value' => get_the_ID(), 'compare' => '=', ), 'starttime_clause' => array( 'key' => 'fsga_breakouts_start_time', 'compare' => 'EXISTS', ), 'session_id_clause' => array( 'key' => 'fsga_breakouts_session_id', 'compare' => 'EXISTS', ), ), 'orderby' => array ( 'starttime_clause' => 'ASC', 'session_id_clause' => 'ASC', ), );
On the front end pages of my site this query and sort works perfectly. I need to do the same query for a page in admin and it seems to ignore the sort. What do I need to do to make sure that the sort does not get ignored in admin?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Using WP_Query with sort in Admin’ is closed to new replies.