useful function: merge_wp_queries()
|Reported by:||markjaquith||Owned by:|
It would be really handy if you could take two WP_Query objects and merge them. Duplicate posts would be removed, and you could choose a sort column and sort order.
$q1 = new WP_Query('monthnum=12&year=2006'); $q2 = new WP_Query('monthnum=1&year=2007'); $merged = merge_wp_queries($q1, $q2, 'post_date_gmt', 'desc');
Change History (9)
8 years ago
- Component changed from Administration to Optimization
- Milestone changed from 2.5 to 2.6
- Milestone changed from 2.9 to Future Release
- Severity changed from normal to minor
- Type changed from task (blessed) to feature request
Note: See TracTickets for help on using tickets.