Prevent users from creating custom tags

Hello,

Is there a way to prevent users from creating their own tags by typing them in?
I’d like them to be limited to the tags that we set on our website.

I’ve tried using this snippet, but the readonly property doesn’t work:

add_filter(
	'hivepress/v1/forms/listing_submit',
	function( $form ) {
			$form['fields']['tags']['readonly'] = true;

		return $form;
	}
);

Thank you,
Andrew

Please try this PHP snippet

add_filter(
	'hivepress/v1/fields/tags',
	function( $args ) {
		unset( $args['attributes']['data-input'] );

		return $args;
	}
);

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