Hi,
I’m trying to order relationship posts by a custom field.
I used what I here found about “reverse query”
http://www.advancedcustomfields.com/resources/tutorials/querying-relationship-fields/
but I didn’t understand how can I sort them by a custom field inside.
So, I wrote di $arg
`$arg = get_posts (array
(
‘meta_query’ => array(
array(
‘key’ => ‘mycustomfield’
‘value’ => ‘”‘ . get_the_ID() . ‘”‘,
‘compare’ => ‘LIKE’,
),
),
)
);
`
I found the right posts.
I need to sort them by a data picker inside in a foreach function.
Can you help me please?
Thanks in advance.