scribu / wp-posts-to-posts

Efficient many-to-many connections between posts, pages, custom post types, users.
http://wordpress.org/plugins/posts-to-posts/
975 stars 261 forks source link

connected meta won't accept nested name for array #567

Open Pollux321 opened 5 years ago

Pollux321 commented 5 years ago

I need to query by two different connected meta values and then orderby one. In order to do that I need to give specific names to the nested queries which works regularly with meta_query but won't in this instance.

So in it's basic form with using orderby, this does not work

` 'connected_meta' => array( 'relation' => 'AND', 'level_meta' => array( 'key' => 'level', 'value' => '2', 'compare' => '=', 'type' => 'numeric', ), 'position_meta' => array( 'key' => 'list_position', 'value' => '1', 'compare' => '=', 'type' => 'numeric', ), ),

It does however work if I remove the array names.`