# A team list

> A repeater of people: name, role, photo and bio, printed as cards.

Source: https://uglydev.com/recipes/a-team-list/
Updated: 20 November 2026

![The team list on the site](https://uglydev.com/wp-content/uploads/2026/11/shot-a-team-list-1.webp)

*The team list on the site.*

**Fields.** `team` (Repeater): `name` (Text), `role` (Text), `photo` (Image, ID), `bio` (Text area).

```php
<div class="team">
	<?php foreach ( ugly_rows( 'team' ) as $member ) : ?>
		<article class="team__member">
			<?php echo wp_get_attachment_image( $member->get( 'photo' ), 'thumbnail' ); ?>
			<h3><?php $member->show( 'name' ); ?></h3>
			<p class="team__role"><?php $member->show( 'role' ); ?></p>

			<?php if ( $member->has( 'bio' ) ) : ?>
				<p><?php $member->show( 'bio' ); ?></p>
			<?php endif; ?>
		</article>
	<?php endforeach; ?>
</div>
```

No `if` around the loop: an empty repeater is an empty list.
