Look Through Family Tree and Find Featured Image
I don’t see anything particularly wrong with it, although I’d probably write the loop like this: $featuredImage=””; foreach ( $familyTree as $family_postid ) { if ( has_post_thumbnail( $family_postid ) ) { $featuredImage = get_the_post_thumbnail( $family_postid, ‘full’ ); break; } } A bit simpler to understand and eliminates the use of the counter and boolean found … Read more