-
Notifications
You must be signed in to change notification settings - Fork 261
Connection ordering
scribu edited this page Jul 21, 2011
·
17 revisions
There are 3 query vars that can be used to order posts by a particular connection field:
$ordered_posts = get_posts( array(
'connected_from' => get_queried_object_id(),
'post_type' => 'product',
'nopaging' => true,
'connected_orderby' => 'order',
'connected_order' => 'asc',
'connected_order_num' => true,
'suppress_filters' => false,
) );
p2p_list_posts( $ordered_posts );