My site is running on PHP 7.2 and it crashed. I don’t believe it is a PHP version issue either.
I have learned that if I use PHP foreach
code, I can get the sub field values. This code snippet works:
if ( $the_query->have_posts() ) :
while ( $the_query->have_posts() ) : $the_query->the_post();
$committees .= '<p><strong>'.get_the_title().'</strong>';
$members = get_field('committee_members' );
foreach ($members as $member) {
$committees .= '<br>'.$member['member'];
}
$committees .= '</p>';
endwhile;
endif;
The previous code using while( have_rows() )
does not, again only for the first post.