Hi,
I am using the following code to display the title and thumbnail for relationships between 2 CPTs 'event' and 'music' :
function test_ref() {
$connected = new WP_Query( [
'relationship' => [
'id' => 'event-music',
'to' => get_the_ID(),],
'nopaging' => true,
] );
while ( $connected->have_posts() ) : $connected->the_post();
the_post_thumbnail( array(80,80) );
the_title();
endwhile;
wp_reset_postdata();
};
I have setup a relationship from User to Post, the ID is event-band, it is not reciprocal. I want to display the name and profile/avatar of the user(band). How do I have to change the above code