<?php

$teamMembers = get_posts(array(
	'post_type' => 'equipe',
	'posts_per_page' => -1,
));

$placeholder_thumbnail_counter = 0;
$personnalized_order = get_field('personnalized_order');
$members_manually_sorted = get_field('members_manually_sorted');


if ($personnalized_order) {
	$teamMembers = $members_manually_sorted;
}

?>

<section <?php echo get_block_wrapper_attributes(array('class' => 'team-authors content-section')); ?>>
	<div class="container mx-auto">
		<ul class="comity-type__list">
			<?php foreach ($teamMembers as $member) : ?>
				<?php get_template_part('template-parts/components/cards/member-card', '', array('member_id' => $member->ID)); ?>

				<?php

				$member_thumbnail = get_field('profile_thumbnail', $member->ID);
				$member_description = get_field('description', $member->ID);
				$member_email = get_field('email', $member->ID);

				$is_director = $member->ID === 476 ? true : false;

				?>



			<?php endforeach; ?>
		</ul>
	</div>
</section>