Allow posts to be ordered by meta_key
|Reported by:||AaronCampbell||Owned by:|
You can specify a meta_key and meta_value when you are getting posts/pages, but you can't then sort those posts by that key. It seems like this is a common need. It's a relatively simple patch, so here it is.
This will work with this patch:
$args = array( 'meta_key' => 'wpo_feedid', 'orderby' => 'wpo_feedid' ); $myQuery = new WP_Query(); $myQuery->get_posts($args);
Change History (17)
Note: See TracTickets for help on using tickets.