Or, embed this snippet using GenerateWP WordPress Plugin.



pods rel value to gravity form

$pod = pods( 'pod_name', get_the_id() );
$blogusers = get_users( array( 'search' => 'user_email' ) );

// Array of WP_User objects.
foreach ( $blogusers as $user ) {
	echo '<span>' . esc_html( $user->user_email ) . '</span>';
	//get the value for the relationship field
	$related = $pod->field( 'relationship_field' );

	//loop through related field, creating links to their own pages
	//only if there is anything to loop through
	if ( ! empty( $related ) ) {
		foreach ( $related as $rel ) { 

			//get id for related post and put in ID
			//for advanced content types use $id = $rel[ 'id' ];
			$id = $rel[ 'ID' ];

			//show the related post name as link
			echo '<a href="'.esc_url( get_permalink( $id ) ).'">'.get_the_title( $id ).'</a>';

			//get the value for some_field in related post and echo it
			$someField = get_post_meta( $id, 'some_field', true );
			echo $someField;
		} //end of foreach