Wordpress Advanced Custom Fields display two fields from two different post types in one template
<p>I have two post types. I need to display content from each within the same loop. At the moment, I can call the 'releases' post type to display content, but I also need to call the 'artists' post type to display some content in the same DIV.</p>

<p>The below line breaks the page with a ‘Catchable fatal error: Object of class WP_Post could not be converted to string error’.</p>

<pre><code>&lt;?php the_field('release_artist_name'); ?&gt;
</code></pre>

<p>How do I get the release_artist_name field to stop breaking the site? It is a field via a Post Object (post type is named ‘artists’). Any help appreciated.</p>

<pre><code>    &lt;?php 
       $posts = get_posts(array(
        'post_type'     =&gt; 'releases'
    )
       ));

       if( $posts ): ?&gt;
    &lt;?php foreach( $posts as $post ): 
       setup_postdata( $post )       
       ?&gt;
&lt;div&gt;
    &lt;?php the_title(); ?&gt; // THIS COMES FROM RELEASES POST TYPE
    &lt;?php the_field('release_artist_name'); ?&gt; // THIS SHOULD COME FROM ARTISTS POST TYPE BUT BREAKS THE PAGE
&lt;/div&gt;

    &lt;?php endif; ?&gt;
    &lt;?php endforeach; ?&gt;
    &lt;?php wp_reset_postdata(); ?&gt;
    &lt;?php endif; ?&gt;
</code></pre>

<p>As asked for below, results from the print_r($posts)...</p>

<pre><code>Array ( [0] =&gt; WP_Post Object ( [ID] =&gt; 10661 [post_author] =&gt; 1 [post_date] =&gt; 2016-03-31 02:37:57 [post_date_gmt] =&gt; 2016-03-31 02:37:57 [post_content] =&gt; [post_title] =&gt; New Gold Mountain [post_excerpt] =&gt; [post_status] =&gt; publish [comment_status] =&gt; closed [ping_status] =&gt; closed [post_password] =&gt; [post_name] =&gt; new-gold-mountain [to_ping] =&gt; [pinged] =&gt; [post_modified] =&gt; 2016-03-31 04:41:04 [post_modified_gmt] =&gt; 2016-03-31 04:41:04 [post_content_filtered] =&gt; [post_parent] =&gt; 0 [guid] =&gt; http://127.0.0.1:4001/wordpress/?post_type=releases&amp;p=10661 [menu_order] =&gt; 0 [post_type] =&gt; releases [post_mime_type] =&gt; [comment_count] =&gt; 0 [filter] =&gt; raw )
</code></pre>