Home › Forums › Ticket Products › Community Tickets › on ordering of articles in the blog.
- This topic has 2 replies, 2 voices, and was last updated 8 years, 6 months ago by Geoff.
-
AuthorPosts
-
September 29, 2015 at 7:29 am #1009654LUIGIParticipant
A strange question on ordering of articles in the blog.
After I installed Tha events calendar, blog entries are sorted on the contrary, and that means from the oldest to most recent.
Can anyone tell me how to return to the just ordering?
Thank youSeptember 29, 2015 at 7:49 am #1009674GeoffMemberHi @Luigi,
Sorry for the trouble here! This is an issue we are aware of and are working to patch up in a maintenance release as soon as possible. I don’t have an exact date for when that is coming, but I would keep your eyes posted this week.
In the meantime, adding this snippet to your functions.php file should help. But, if not, please do watch for the release and that should address the issue.
function fix_blog_loop_event_ordering( $sql, $query ) { if ( ! class_exists( 'Tribe__Events__Pro__Main' ) ) { return; } if ( ! isset( $query->query_vars[ 'is_tribe_widget' ] ) || ! $query->query_vars[ 'is_tribe_widget' ] ) { if ( tribe_is_month() || tribe_is_week() || tribe_is_day() ) { return $sql; } } if ( ! empty( $query->tribe_is_event ) || ! empty( $query->tribe_is_multi_posttype ) ) { if ( isset( $query->query_vars[ 'tribeHideRecurrence' ] ) && $query->query_vars[ 'tribeHideRecurrence' ] ) { return str_replace( 'ORDER BY EventStartDate ASC', 'ORDER BY EventStartDate DESC', $sql ); } } return $sql; } add_filter( 'posts_request', 'fix_blog_loop_event_ordering', 20, 2 );
Cheers!
GeoffOctober 1, 2015 at 1:49 pm #1010652GeoffMemberHey there! Just a heads up that The Events Calendar 3.12.3 and The Events Calendar PRO 3.12.2 shipped just minutes ago and include a fix for the issue you reported here. Please do check it out and make the update!
Thanks for your patience and support while we worked this out. 🙂
Geoff
-
AuthorPosts
- The topic ‘on ordering of articles in the blog.’ is closed to new replies.