Issue with admin page sorting
-
Hello, we recently had an issue where the Post Types Order was affecting the pages wp_query in admin. Bascially, we lost alphabetical with parent / child reference, sorting. So before we updated to the latest plugin, our pages in admin would look like this:
About Us - Contact Us - Locations - Social Our Food Menu Why Choose Us?
With the new version of PTO, the sorting goes something like this:
Our Food Menu Why Choose Us? About Us - Contact Us - Locations - Social
I made a modification to the post-types-order.php around line 76 within the CPTOrderPosts() function and added:
function CPTOrderPosts($orderBy, $query) { // ignore pages and retain original sorting if( $query->query['post_type'] == 'page' ) return $orderBy; global $wpdb; $options = cpt_get_options(); ....... rest of function
I think we need to add something in to totally disable the PTO functions if the current query is done in admin and is a pages query, since pages are hierarchical.
version 1.7.7 worked flawlessly
Thank you!
- The topic ‘Issue with admin page sorting’ is closed to new replies.