FEATURE Handling thumbnail position style in author card component

This commit is contained in:
Antoine M 2026-02-17 14:56:46 +01:00
parent 6ed5634638
commit 4be0368ea4

View File

@ -6,13 +6,13 @@ $member_thumbnail = get_field('profile_thumbnail', $member_id);
$member_description = get_field('description', $member_id);
$member_email = get_field('email', $member_id);
$tumbnailPosition = get_field('profile_thumbnail_position', $member_id) ?? '50%';
?>
<li class="comity-type__item author-card">
<div class="author-card__profile-picture">
<?php if ($member_thumbnail) : ?>
<a href="<?php echo get_the_permalink($author->ID); ?>">
<img src="<?php echo $member_thumbnail['url']; ?>" alt="<?php echo $member_thumbnail['alt']; ?>">
<img style="object-position: 50% <?php echo $tumbnailPosition; ?>%;" src="<?php echo $member_thumbnail['url']; ?>" alt="<?php echo $member_thumbnail['alt']; ?>">
</a>
<?php else : ?>
<a href="<?php echo get_the_permalink($member_id); ?>">