Update from 2.11 to 2.12 breaks frontend sorting
-
Hi,
thanks for this awesome plugin!
After updating from 2.11.0 to 2.12.5, our frontend sorting is not working anymore.
This is how we retrieve posts:
$trainings = get_posts( array( 'post_type' => 'tribe_events', 'numberposts' => -1, 'suppress_filters' => false, 'tax_query' => array( array( 'taxonomy' => 'tribe_events_cat', 'field' => 'term_id', 'terms' => $term->term_id, ) ) ) );
This is the debug error message when it is NOT working:
[04-May-2022 09:52:36 UTC] DEBUG_MSG: [88]./public/class-reorder-post-within-categories-public.php + RPWC2 SORT VALIDATION, sorting posts in term: 691 [04-May-2022 09:52:36 UTC] DEBUG_MSG: + RPWC2 SORT VALIDATION, found post_type 'tribe_events' / taxonomy 'tribe_events_cat'(691) [04-May-2022 09:52:37 UTC] DEBUG_MSG: + RPWC2 SORT VALIDATION, found post_type 'tribe_events' / taxonomy 'tribe_events_cat'(691) [04-May-2022 09:52:37 UTC] DEBUG_MSG: + RPWC2 SORT VALIDATION ABORTED, for orderby: date
I already tried the following filter with no success:
add_filter('reorderpwc_filter_multiple_post_type', 'filter_my_ranked_post_type', 10, 4); function filter_my_ranked_post_type($type, $post_types, $taxonomy, $wp_query){ if('tribe_events_cat' == $taxonomy && in_array('tribe_events',$post_types)) $type = 'tribe_events'; return $type; }
With version 2.11.0 this is the debug output:
[88]./public/class-reorder-post-within-categories-public.php + RPWC2 SORT VALIDATION, sorting posts in term: 691 [04-May-2022 10:03:13 UTC] DEBUG_MSG: + RPWC2 SORT VALIDATION, found post_type 'tribe_events' / taxonomy 'tribe_events_cat'(691) [04-May-2022 10:03:14 UTC] DEBUG_MSG: + RPWC2 SORT VALIDATION, sorting posts in term: 691 [04-May-2022 10:03:14 UTC] DEBUG_MSG: + RPWC2 SORT VALIDATION, found post_type 'tribe_events' / taxonomy 'tribe_events_cat'(691) [04-May-2022 10:03:14 UTC] DEBUG_MSG: + RPWC2 SORT VALIDATION, overriding orderby: date
Could you have a look at this issue?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Update from 2.11 to 2.12 breaks frontend sorting’ is closed to new replies.