Delete category

I saw this response: Unfortunately, it’s not possible at the moment to assign multiple categories to vendors; yet, there’s a workaround: try deleting the Category field (it’ll disappear from the registration form).

My question is: How do I delete the category field?

Hi @mheefu,

You can try the following snippet to remove categories:

// Remove Category field from listing submit form
add_filter(
	'hivepress/v1/forms/listing_submit',
	function( $form ) {
		unset($form['fields']['categories']);	

		return $form;
	},
	1000
);

// Remove Category field from listing filter form
add_filter(
	'hivepress/v1/forms/listing_filter',
	function( $form ) {
		unset($form['fields']['_category']);	

		return $form;
	},
	1000
);

Or, to allow users to select multiple categories, see the solutions in this topic:

I hope this helps!

Cheers,
Chris :victory_hand:

Thank you very much - will try and see

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