Category Management

Hi guys,

I have read many other posts about the fact that you can’t multiselect categories. How do you guys override this feature limit ?

I need to register vendors that can be classified in one or more categories.

Ex : a vendor can be skilled in plumbing and be also an electrician.

Is there a way to manage this anyway ?

Thanks for your help !

Regards,

Please try this PHP snippet but please note that it can require further customization and testing because categories are used as distinct criteria, many features rely on this (e.g. category-specific attributes and search filters).

add_filter(
	'hivepress/v1/forms/vendor_submit',
	function( $form ) {
		if(isset($form['fields']['categories'])){
			$form['fields']['categories']['multiple'] = true;	
		}
		return $form;
	},
	1000
);
1 Like

thank you for your reply
i tried it but it doen’t work
Categories remain as a drop down list and not as a multi select list
How do other users override this ?
Regards,

Please make sure that you added this snippet correctly (e.g. via the Code Snippets plugin), the Category field will be displayed as a drop-down, but if you select any option it will allow to select more, selected options will be added to the field area.