I want to list the most connected posts ordered by quantity. ¿Is it possible? ¿Could anyone help me with that? I explain with an example: let's say I have Movies
custom post type and an Actors
custom post type, that are connected with Posts 2 Posts
. In the Actors archive, I want to order them by the number of Movies that they have worked on.
I think it is maybe possible with each_connected()
, but I don't know how to order the $wp_query
array by the number of elements in connected
subarray for every $post
.
Thanks.