Instead of remove_all_actions pre_get_posts, add:
'ignore_custom_sort' => true
to the query arguments, e.g.:
$args = array(
'post_type' => 'page',
'post__in' => array(1,2,3),
'orderby' => 'post__in',
'suppress_filters' => true,
'ignore_custom_sort' => true
);
// The Query
$query = new WP_Query( $args );
This ignores the custom sort by the Post Types Order plugin (https://www.ads-software.com/plugins/post-types-order/). See CPTO_pre_get_posts() function in post-types-order.php
-
This reply was modified 8 years, 5 months ago by chriswingman.
-
This reply was modified 8 years, 5 months ago by chriswingman.
-
This reply was modified 8 years, 5 months ago by chriswingman.