Make tags required & limit quantity

Can we make TAGS mandatory instead of optional? How can I do this?

I would like to be able to set a maximum of 1 to 5 TAGS myself.

Please try this PHP snippet

	function( $attributes ) {
		if ( isset( $attributes['tags'] ) ) {
			$attributes['tags']['edit_field'] = array_merge(
				'required' => true,
				'max_values' => 5,
		return $attributes;

I would like to set tags as optional, and if tags are used, I would like to set a limit of 10 tags.
Is this possible?

Please try to remove 'required' => true and change number 5 to number 10 in the code snippet above

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.