# A working sample of a repeater?

**URL:** <https://community.hivepress.io/t/a-working-sample-of-a-repeater/14201>\
**Category:** HivePress\
**Tags:** code\
**Created:** [January 7, 2025, 8:38pm UTC](https://community.hivepress.io/t/a-working-sample-of-a-repeater/14201 "2025-01-07T20:38:40Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![ihor](https://community.hivepress.io/user_avatar/community.hivepress.io/ihor/32/5_2.png) [@ihor](https://community.hivepress.io/u/ihor)\
**Post date:** [January 8, 2025, 11:21am UTC](https://community.hivepress.io/t/a-working-sample-of-a-repeater/14201/4 "2025-01-08T11:21:08Z")

</div>

Hi,

You can try this sample code snippet:

```auto
add_filter(
	'hivepress/v1/models/listing/attributes',
	function( $attributes ) {
		$attributes['test'] = [
			'editable' => true,

			'edit_field' => [
				'type' => 'repeater',
				'label' => 'Test',
				'_order' => 123,

				'fields' => [
					'title' => [
						'type' => 'text',
						'placeholder' => 'Title',
					],

					'description' => [
						'type' => 'text',
						'placeholder' => 'Description',
					],
				],
			],

		];

		return $attributes;
	}
);

```

We also plan to make this field type available in the Attributes UI.

---

_[View the full topic](https://community.hivepress.io/t/a-working-sample-of-a-repeater/14201)._
