Support MB Relationships Relationships - change order of posts returned by shortcode Reply To: Relationships - change order of posts returned by shortcode

#12859
Anh TranAnh Tran
Keymaster

Hi Max, the order and orderby should be outside of relationship param, as they're arguments for WP_Query. Please try:

$connected = new WP_Query( array(
    'relationship' => array(
        'id' => 'therapists_to_modalities',
        'to' => get_the_ID(),
    ),
    'orderby' => 'name',
    'order' => 'ASC',
    'nopaging'     => true,
) );