function oxy_shortcode_staff_featured($atts, $content = '') { $output = ''; if (isset($atts['member']) && !empty($atts['member'])) { $staff = get_post($atts['member']); if (count($staff) > 0) { $output = oxy_create_staff($staff, $atts); } } // reset post data because we are all done here wp_reset_postdata(); return $output; }
<div class="<?php echo esc_attr(implode(' ', $container_classes)); ?> "> <?php foreach ($posts as $post) { $atts['margin_top'] = 0; echo oxy_create_staff($post, $atts); if ($atts['scroll_animation_timing'] === 'staggered') { $atts['scroll_animation_delay'] += $item_delay; } } ?> </div>