NooTheme Premium WordPress Theme › Forums › Timetable › Change Order of Events: Ascending
- This topic has 11 replies, 2 voices, and was last updated 2 years, 8 months ago by dangdv.
-
AuthorPosts
-
2 years, 9 months ago #1217694
Hi
The events on the archive page are showing in Decending order. I want them to show in Ascending order. I can't find an option in admin to do that.
I picked sort by "Event Date" but it shows August 2022 event 1st on the Events page (.../events/). I want to show January 2022 events 1st and August 2022 events last.
Can you tell me how please?
Attachments:
You must be logged in to view attached files.2 years, 8 months ago #1217746Dear, the Sort order setting 'Event Date' is sort by Event start date. Please kindly send for me admin account and your page URL with Sort order problem. I will check details to help you.
Best regards.
2 years, 8 months ago #1217755This reply has been marked as private.2 years, 8 months ago #1217759Dear, because default plugin use order by DESC, if you want change sort order ASC for events page, please add custom PHP code to file
functions.php
of your theme.if ( ! is_admin() ) : add_action( 'pre_get_posts', function($query){ if ($query->is_post_type_archive( 'noo_event' ) && $query->is_main_query() ) { $query->set( 'order', 'ASC' ); } },20); endif;
Best regards.
2 years, 8 months ago #1217763This reply has been marked as private.2 years, 8 months ago #1217764This reply has been marked as private.2 years, 8 months ago #1217771This reply has been marked as private.2 years, 8 months ago #1217775This reply has been marked as private.2 years, 8 months ago #1217784Hi
Please let me know about this so that I can try to launch the site this weekend. Thank you 🙂
2 years, 8 months ago #1217790This reply has been marked as private.2 years, 8 months ago #1217793This reply has been marked as private.2 years, 8 months ago #1217801Dear, I have check your site and enable Noo Timetable plugin and clear setting of plugin. Now, it's working, Please check your site again.
Best regards.
-
AuthorPosts
You must be logged in and have valid license to reply to this topic.