'.$stfbtitle.''; $viewstaffboxes = ''; foreach (range(1, 5 ) as $staffboxsnumber ) { $stfimg = ''; $stfimgautomatic = ''; $stfpostid = ''; $stfautoname = ''; $stfautodesig = ''; $stfautolink = ''; $stfimg = esc_url(associationx_get_option('staffboxes-image' . $staffboxsnumber, '')); $stfimgautomatic = associationx_get_option('staffboxes-image-automatic' . $staffboxsnumber, ''); if( $stfimg && $stfimgautomatic ): $stfpostid = attachment_url_to_postid($stfimg); $associationx_getattpost = get_post( $stfpostid ); $stfautolink = esc_url(get_permalink( $associationx_getattpost->ID )); $stfautoname = esc_attr($associationx_getattpost->post_title); $stfautodesig = wp_kses_post($associationx_getattpost->post_excerpt); endif; $stfname = ''; if($stfautoname) $stfname = $stfautoname; if($stfimg) $stfimg = ''; if($stfname) $stfname= '
'.$stfdes.'
'; if($stfname || $stfdes ) $stfname ='