The next version of Index is here! To celebrate, take 25% off your purchase with the code 25OFF. Learn more
Index Logo

Multiple items

Register fields that only display when multiple items are being edited. Each field returns only its type. Fields are registered in PHP and sanitization is handled by Index.

Registering a multiple item edit field

Each edit field is tied to a specific post type:

// replace {$type} with the post type name
add_filter("index_{$type}_edit_fields", function($fields) {
	return $fields;
});

See the Creating fields [LINK] document for more information on how to format fields.


Example

add_filter("index_post_edit_fields", function($fields, $post_id) {
	$fields[] = [
		'id' => 'custom_field_id',
		'label' => 'Custom field name',
		'type' => 'meta',
		'component' => 'text',
	];

	return $fields;
});

Resources

  • Creating fields
  • Saving field data
  • Sorting fields

Get started with Index

See for yourself why Index is the most intuitive, beautiful interface for managing your WordPress content.