Multiple loops on category.php WP_Query or pre_get_posts?
Clash Royale CLAN TAG #URR8PPP Multiple loops on category.php WP_Query or pre_get_posts? Bit of background i have an normal events category, specifically for that category there is a date meta box for the date of the event. In the list of posts on that page category-events.php i need the upcoming posts to appear first in the list and then the events that are in the past to appear after. So how can i combine two loops to spit out the list of posts that are upcoming first and events in the past after those. Can you combine a pre_get_posts to do this, or just use two WP_Query on the category-events.php file? pre_get_posts WP_Query pre_get_posts Query for upcoming events... pre_get_posts function events_query_order($query){ if( ! is_admin() && $query->is_main_query() ): $query->set( 'cat', '3' );//Specific Event Category $query->set( 'meta_key', 'event_date_picker' ); $query->set( ...